Proffieboard slowing and eventually freezing

Got 2 board, same setup, same code, same behavior. Makes sense right?
Below a video demo.

As soon as music plays, the board slows down. (you can see it in the video with ignition animation).

When more events happen such as clash and lockup, the board sometimes fully freezes.

I just realized there are 127 tracks on the SD, could that be an issue? Its far from full.

Proffie 2.5 I think, bought them from KR a month ago with good SD cards that were tested before.
ProffieOS 6.9.


File structure
├───arcann
│   ├───bgndrag
│   ├───bgnlb
│   ├───bgnlock
│   ├───bgnmelt
│   ├───blst
│   ├───boot
│   ├───clsh
│   ├───drag
│   ├───enddrag
│   ├───endlb
│   ├───endlock
│   ├───endmelt
│   ├───font
│   ├───force
│   ├───hum
│   ├───in
│   ├───lb
│   ├───lock
│   ├───melt
│   ├───out
│   ├───spin
│   ├───stab
│   ├───swingh
│   ├───swingl
│   ├───swng
│   └───tracks
├───betray
│   ├───bgndrag
│   ├───bgnlb
│   ├───bgnlock
│   ├───bgnmelt
│   ├───blst
│   ├───boot
│   ├───clsh
│   ├───color
│   ├───drag
│   ├───enddrag
│   ├───endlb
│   ├───endlock
│   ├───endmelt
│   ├───force
│   ├───in
│   ├───lb
│   ├───lock
│   ├───lowbatt
│   ├───melt
│   ├───out
│   ├───preon
│   ├───spin
│   ├───stab
│   ├───swingh
│   ├───swingl
│   └───swng
├───blind
│   ├───bgndrag
│   ├───bgnlb
│   ├───bgnlock
│   ├───bgnmelt
│   ├───blst
│   ├───boot
│   ├───clsh
│   ├───color
│   ├───drag
│   ├───enddrag
│   ├───endlb
│   ├───endlock
│   ├───endmelt
│   ├───force
│   ├───in
│   ├───lb
│   ├───lock
│   ├───lowbatt
│   ├───melt
│   ├───out
│   ├───preon
│   ├───spin
│   ├───stab
│   ├───swingh
│   ├───swingl
│   └───swng
├───butcher
│   ├───bgndrag
│   ├───bgnlb
│   ├───bgnlock
│   ├───bgnmelt
│   ├───blst
│   ├───boot
│   ├───clsh
│   ├───color
│   ├───drag
│   ├───enddrag
│   ├───endlb
│   ├───endlock
│   ├───endmelt
│   ├───force
│   ├───in
│   ├───lb
│   ├───lock
│   ├───lowbatt
│   ├───melt
│   ├───out
│   ├───preon
│   ├───spin
│   ├───stab
│   ├───swingh
│   ├───swingl
│   └───swng
├───cathar
│   ├───bgndrag
│   ├───bgnlb
│   ├───bgnlock
│   ├───bgnmelt
│   ├───blst
│   ├───boot
│   ├───clsh
│   ├───color
│   ├───drag
│   ├───enddrag
│   ├───endlb
│   ├───endlock
│   ├───endmelt
│   ├───force
│   ├───in
│   ├───lb
│   ├───lock
│   ├───lowbatt
│   ├───melt
│   ├───out
│   ├───preon
│   ├───spin
│   ├───stab
│   ├───swingh
│   ├───swingl
│   └───swng
├───common
│   ├───clrlst
│   ├───mnum
│   └───tracks
├───discip
│   ├───bgndrag
│   ├───bgnlb
│   ├───bgnlock
│   ├───bgnmelt
│   ├───blst
│   ├───boot
│   ├───clsh
│   ├───color
│   ├───drag
│   ├───enddrag
│   ├───endlb
│   ├───endlock
│   ├───endmelt
│   ├───force
│   ├───in
│   ├───lb
│   ├───lock
│   ├───lowbatt
│   ├───melt
│   ├───out
│   ├───preon
│   ├───spin
│   ├───stab
│   ├───swingh
│   ├───swingl
│   └───swng
├───exile
│   ├───bgndrag
│   ├───bgnlb
│   ├───bgnlock
│   ├───bgnmelt
│   ├───blst
│   ├───boot
│   ├───clsh
│   ├───color
│   ├───drag
│   ├───enddrag
│   ├───endlb
│   ├───endlock
│   ├───endmelt
│   ├───force
│   ├───in
│   ├───lb
│   ├───lock
│   ├───lowbatt
│   ├───melt
│   ├───out
│   ├───preon
│   ├───spin
│   ├───stab
│   ├───swingh
│   ├───swingl
│   └───swng
├───fist
│   ├───bgndrag
│   ├───bgnlb
│   ├───bgnlock
│   ├───bgnmelt
│   ├───blst
│   ├───boot
│   ├───clsh
│   ├───color
│   ├───drag
│   ├───enddrag
│   ├───endlb
│   ├───endlock
│   ├───endmelt
│   ├───force
│   ├───in
│   ├───lb
│   ├───lock
│   ├───lowbatt
│   ├───melt
│   ├───out
│   ├───preon
│   ├───spin
│   ├───stab
│   ├───swingh
│   ├───swingl
│   └───swng
├───hand
│   ├───bgndrag
│   ├───bgnlb
│   ├───bgnlock
│   ├───bgnmelt
│   ├───blst
│   ├───boot
│   ├───clsh
│   ├───color
│   ├───drag
│   ├───enddrag
│   ├───endlb
│   ├───endlock
│   ├───endmelt
│   ├───force
│   ├───in
│   ├───lb
│   ├───lock
│   ├───lowbatt
│   ├───melt
│   ├───out
│   ├───preon
│   ├───spin
│   ├───stab
│   ├───swingh
│   ├───swingl
│   └───swng
├───hermit
│   ├───bgndrag
│   ├───bgnlb
│   ├───bgnlock
│   ├───bgnmelt
│   ├───blst
│   ├───boot
│   ├───clsh
│   ├───color
│   ├───drag
│   ├───enddrag
│   ├───endlb
│   ├───endlock
│   ├───endmelt
│   ├───force
│   ├───in
│   ├───lb
│   ├───lock
│   ├───lowbatt
│   ├───melt
│   ├───out
│   ├───preon
│   ├───pstoff
│   ├───spin
│   ├───stab
│   ├───swingh
│   ├───swingl
│   └───swng
├───hunger
│   ├───bgndrag
│   ├───bgnlb
│   ├───bgnlock
│   ├───bgnmelt
│   ├───blst
│   ├───boot
│   ├───clsh
│   ├───color
│   ├───drag
│   ├───enddrag
│   ├───endlb
│   ├───endlock
│   ├───endmelt
│   ├───force
│   ├───in
│   ├───lb
│   ├───lock
│   ├───lowbatt
│   ├───melt
│   ├───out
│   ├───preon
│   ├───pstoff
│   ├───spin
│   ├───stab
│   ├───swingh
│   ├───swingl
│   └───swng
├───hunt
│   ├───bgndrag
│   ├───bgnlb
│   ├───bgnlock
│   ├───bgnmelt
│   ├───blst
│   ├───boot
│   ├───clsh
│   ├───color
│   ├───drag
│   ├───enddrag
│   ├───endlb
│   ├───endlock
│   ├───endmelt
│   ├───force
│   ├───in
│   ├───lb
│   ├───lock
│   ├───lowbatt
│   ├───melt
│   ├───out
│   ├───preon
│   ├───spin
│   ├───stab
│   ├───swingh
│   ├───swingl
│   └───swng
├───maiden
│   ├───bgndrag
│   ├───bgnlb
│   ├───bgnlock
│   ├───bgnmelt
│   ├───blst
│   ├───boot
│   ├───clsh
│   ├───color
│   ├───drag
│   ├───enddrag
│   ├───endlb
│   ├───endlock
│   ├───endmelt
│   ├───force
│   ├───in
│   ├───lb
│   ├───lock
│   ├───lowbatt
│   ├───melt
│   ├───out
│   ├───preon
│   ├───spin
│   ├───stab
│   ├───swingh
│   ├───swingl
│   └───swng
├───metal
│   ├───bgndrag
│   ├───bgnlb
│   ├───bgnlock
│   ├───bgnmelt
│   ├───blst
│   ├───boot
│   ├───clsh
│   ├───color
│   ├───drag
│   ├───enddrag
│   ├───endlb
│   ├───endlock
│   ├───endmelt
│   ├───force
│   ├───in
│   ├───lb
│   ├───lock
│   ├───lowbatt
│   ├───melt
│   ├───out
│   ├───preon
│   ├───spin
│   ├───stab
│   ├───swingh
│   ├───swingl
│   └───swng
├───pain
│   ├───bgndrag
│   ├───bgnlb
│   ├───bgnlock
│   ├───bgnmelt
│   ├───blst
│   ├───boot
│   ├───clsh
│   ├───color
│   ├───drag
│   ├───enddrag
│   ├───endlb
│   ├───endlock
│   ├───endmelt
│   ├───force
│   ├───in
│   ├───lb
│   ├───lock
│   ├───lowbatt
│   ├───melt
│   ├───out
│   ├───preon
│   ├───spin
│   ├───stab
│   ├───swingh
│   ├───swingl
│   └───swng
├───shan
│   ├───bgndrag
│   ├───bgnlb
│   ├───bgnlock
│   ├───bgnmelt
│   ├───blst
│   ├───boot
│   ├───clsh
│   ├───color
│   ├───drag
│   ├───enddrag
│   ├───endlb
│   ├───endlock
│   ├───endmelt
│   ├───force
│   ├───in
│   ├───lb
│   ├───lock
│   ├───lowbatt
│   ├───melt
│   ├───out
│   ├───spin
│   ├───stab
│   ├───swingh
│   ├───swingl
│   └───swng
├───slicer
│   ├───bgndrag
│   ├───bgnlb
│   ├───bgnlock
│   ├───bgnmelt
│   ├───blst
│   ├───boot
│   ├───clsh
│   ├───color
│   ├───drag
│   ├───enddrag
│   ├───endlb
│   ├───endlock
│   ├───endmelt
│   ├───force
│   ├───in
│   ├───lb
│   ├───lock
│   ├───lowbatt
│   ├───melt
│   ├───out
│   ├───preon
│   ├───spin
│   ├───stab
│   ├───swingh
│   ├───swingl
│   └───swng
└───thexan
    ├───bgndrag
    ├───bgnlb
    ├───bgnlock
    ├───bgnmelt
    ├───blst
    ├───boot
    ├───clsh
    ├───drag
    ├───enddrag
    ├───endlb
    ├───endlock
    ├───endmelt
    ├───font
    ├───force
    ├───hum
    ├───in
    ├───lb
    ├───lock
    ├───melt
    ├───out
    ├───spin
    ├───stab
    ├───swingh
    ├───swingl
    ├───swng
    └───tracks

Config :

See if this helps?

If you update to OS7x, you can also use #define KILL_OLD_PLAYERS to make sure you don’t run out of wav players when new ones are needed for additional effects to play.

1 Like

Will try.
First thing I’m doing is fixing the insane amount of tracks.

Try just putting the track(s) you want to use for a font inside the font folder itself in a tracks sub folder instead of one large directory.

Having a lot of tracks can cause an audio glitch when starting/looping a track, but it shouldn’t cause any issues with playing the track.

What does sdtest all say about your SD card though?

Update:
Board runs a bit smoother after cleaning up the code and deleting excess tracks.
Mostly the code cleaning in my opinion.
From 91% down to 77% but still too much to run on “Fast” instead of “Smallest”.
Anything else I can delete from the config?
I want to have the color change and for it to save the color and volume.

New config!!!

best practice to run it with battery in or out?

Shouldn’t matter.

To save flash memory, see this page:

It is most likely the SD card’s speed. The % of FLASH memory shouldn’t impact performance, you can use 100% of FLASH memory and have everything run normally with a good SD card, with a crappy SD card a single style can still lag or freeze.

You can also easily confirm it’s the SD by simply removing the SD and using the saber, you’ll get an SD card not found error and no sound but all visual effects should run normally without lag or freezing.

Check your SD speed, most likely the SD card is insufficient (there’s been a lot of poor performing cards popping up). As profezzorn noted run ‘sdtest’ in Serial Monitor, you want at least 1200kbps with 12 simultaneous audio streams otherwise you’ll have performance issues. If your card is less than above definitely get a better performing card.

sdtest all freezes.

running sdtest alone gives me
Time to read blocks: Average speed: 1004.29 kb/s, 11.39 simultaneous audio streams.
Which is not good.

Any good recommendations for SD cards?
Kind of surprised this came stock from KR.

Marked as solution as the speed is not good.

11.39 isn’t great, but it should be enough.
sdtest all freezing is not good though, that probably means some files on your sd card are corrupted somehow I think. (Unless I have some bugs in the sdtest code)

if you’d like I can share a link privately with my files and you are welcome to test to see if its the code. Just let me know where to reach out

Update :

  • Upgraded to latest OS
  • Remade a whole new config with the builder with basic setups.
  • Found other SD cards that test over 12 streams and have been good in other boards

Results remain the exact same and severe lag is present.
Likely diagnose is that the batch of boards has bad hardware.

Only way to make sure it’s a hardware issue is to run the same code and the same SD card on another board and verify that that works.

What happens when you run without SD card inserted?
You’ll get error messages and no sound but do visual effects show any lag?
If no lag without SD, then the issue is still SD card speed/corruption.

Update:

Will test Fett263 suggestion in a second.

“TOP” output:
Battery voltage: 4.01
Audio DMA: 0.00%
Wav reading: 0.00%
Pixel DMA: 0.00%
LOOP: 36.05%
Motion: 0.00%
Global loops / second: 7440.37
High frequency loops / second: 7378.05
blade fps:
Acceleration measurements per second: 1608.29
Hybrid Font loop: 3.33%
WS2811_Blade loop: 4.99%
ClockControl loop: 2.40%
Booster loop: 3.33%
SDCard loop: 5.18%
Amplifier loop: 3.33%
LSM6DS3H loop: 6.47%
I2CBus loop: 3.14%
Parser loop: 3.84%
aux loop: 4.62%
pow loop: 5.55%
SaberFett263Buttons loop: 1.86%
BatteryMonitor loop: 3.70%
Fusor loop: 3.15%
AudioDynamicMixer loop: 4.62%
MonitorHelper loop: 4.44%

Issue mostly visible when music running along the saber.
Seemingly clean without the SD card. Hard to process but it may be the SDcard still.

This is a pain :slight_smile:

Quick note, thank you for everyone helping!!!