I’ve had this specific saber for about a month. This issue only started happening yesterday. One of two things happen:
I get random SD card not found errors upon de-activating the killswitch. Lights on chassis/hilt turn on.
I get no verbal error, and nothing seemingly happens when I de-activate the killswitch. No lights, saber doesn’t work. This doesn’t happen if I take the SD card out, however. Also, if I attempt to plug it into the computer in this “frozen” state, my PC does not register the board.
I was able to narrow this down to this likely being the board. Things I’ve tried:
3 known good SD cards. Kingston industrial, SanDisk Ultra, and an E123.
Formatted all of them
Tried older configs which did not have these issues
sdtest in serial monitor shows no issues with the reading ability on any of the cards… 1000-1400kb/s depending on the card.
The saber functions as normal once the SD card manages to mount
Onto the weird fix:
Upon defining ‘VERBOSE_SD_ERRORS’ in my config (using the master branch of ProffieOS), my issues literally vanished into thin air. I was able to get successful consecutive boots counting to over 100, never got a single error or a freeze.
I re-wrote the same config to my board, without ‘VERBOSE_SD_ERRORS’, and I was having issues again. More than half the time, my board was failing to mount the SD card.
And I again put the ‘VERBOSE_SD_ERRORS’ define back in my config, wrote it to board, and I got another 100+ successful consecutive boots.
Lastly, here is my config that is currently written to the board.
So interestingly, using only Serial eliminated all of my SD card not found errors. However, half my attempts to get the saber to boot ended with the freeze error I described above.
Also I noticed a new issue:
My saber doesn’t wake up from idle using ‘IDLE_OFF_TIME’ if I leave it for a few minutes in that state. The saber becomes unresponsive. Leaving it plugged it via USB, I was able to let it go to idle and turn it back on 30 minutes later.
I used to be able to leave it for long periods of time in idle, and it would turn right back on.
Ah thank you for that- no, I didn’t get it on 7.8, I am using the current master which is the likely culprit. I believe since the VERBOSE_SD_ERRORS define is limited to the current master, I will just learn to live with it until it is fixed!
OK, so it would appear that a pattern is emerging. Until recently I always used Serial + WebUSB too, in order to give customers the opportunity to tweak without diving in too deep, but it was only recently when I had this problem again that I tried Serial only and got the same result as you, i.e. no SD card errors.
So Prof, is it premature to ask, have we finally managed to lure this gremlin out from the shadows and into the microwave - so that all we have to do now is figure out how to nuke it?
So, I have long suspected that maybe there is a buffer overrun somewhere in the serial code.
Obviously I haven’t found such a bug, if I had, I would have fixed it.
A buffer overrun in the serial code could cause modifications to whatever is before and/or after it in memory, which could have essentially random effects. However, most of the time, the thing that was before/after would be the same thing, and maybe, just maybe, it’s the SDSPI memory that is getting trampled, causing problems if the circumstances are just right…
just letting you know i tracked down the issue - in my case it was likely driver related since i have zero issues with the saber in question when i use my other pc to write configs to the board
also worth mentioning that i think the solutions before were a fluke even if there is a statistical substance to them. at a certain point, all solutions i mentioned prior stopped working and i kept encountering read errors.
it seemed like something was going wrong in the write process- presently, ~90% of writes to the board using the problematic PC ended up with issues. sometimes i got a good one, and there were no issues until it came time to re-upload to the board, but obviously this isn’t ideal if you’re constantly fiddling with the config.
i also sent the same saber in to someone else for some other issue, and they also had no issue with sd card read errors when they wrote to the board multiple times.