Board doesn't reset/boot to ProffieOS properly after successful upload

I’ve been having an issue with my Sabertrio Proffie powercore where my uploads from Arduino are successful, but the board doesn’t boot back to ProffieOS afterward - which necessitates me pulling the core out of the hilt and cutting battery power to reset it. After that, it boots and works just fine. This is only an issue because it’s annoying to constantly unscrew the hilt and remove the board - I would never have to do that if I could just get the board to properly boot back to ProffieOS. As it is, I connect a USB-C cable to the core through a hole in the hilt, with battery power still connected to board. I have tried several cables and bought one that’s USB-IF certified. I’m connecting directly to a USB port on my laptop.

The weird thing is, at the end of the upload when the board fails to connect back to COM port, it’s in limbo - it’s neither communicating over serial nor is it still in bootloader mode. It’s not in Windows Device Manager at all. What could it be doing? In some kind of ProffieOS bootloop or hanging on some #define or something? How would I be able to diagnose if I can’t see it in DFU mode or serial?

Sometimes, maybe 1 upload in 10, it does boot back to ProffieOS without cutting the battery power. There doesn’t seem to be any pattern to when or why it does this. In the original stock configuration from Sabertrio, it seemed to be pretty consistent with booting back up correctly. Since then I’ve modified their same config file to add a bunch of fonts and defines, and switch to the Fett263 prop from their Sabertrio_Buttons one. But switching back to their prop, or even another like SaberBC, doesn’t change things. I’ve removed some defines to try and isolate a ‘bad’ one and haven’t had any luck so far.

The various component revisions I’ve been working with (and I have tried fully uninstalling and reinstalling each of the software and driver versions during troubleshooting) -
Proffieboard v3.9
ProffieOS v7.12, 7.15, 8.x beta
Arduino IDE 2.3.6
Proffie board manager 4.6 & 3.6
proffie-dfu-setup
Windows 11 Home 24H2

Something like this happens to me sometimes, but far less seldom. (Like maybe one in 20 programmings or something?). I’m not sure what causes it though. The board still works fine in this state right? It’s just USB that isn’t working properly? In my case I usually just press reset on the board and then it works again, unplugging and plugging in USB also usually works.

If you’re using a USB-C cable, then obviously you are not plugging right into the board itself, and it’s possible that those extra wires (and charging circuit?) is doing something, or throwing off some timing somewhere.

It could also be software related, but I haven’t been able to nail down a thing that causes it…

You don’t have a kill switch ?

Not outside the hilt, the Sabertrio modular powercore system has a kill switch that’s on the core inside the hilt. To operate it, you unscrew the pommel and drop the core. This is just a weird issue that it would be nice to solve so I don’t have to drop the core every time I make a configuration change.

I should’ve clarified - actually, the board does not work whatsoever in this ‘limbo’ state. No response to gestures or hilt buttons, and I’ve found no way to interact with it at all. Reconnecting the cable doesn’t change anything. But cutting power resets it just fine, without even needing to use the buttons on the board itself, and the board gives me zero issues and has never entered this state except after an upload when Arduino/DFU Utility is supposed to trigger a reset to boot back into ProffieOS. The LED side of the board is mostly obscured by the core, but I could tell it was a solid green light. I downloaded DFU Utility separately just to see if it would recognize the board in this state, though I already knew it wasn’t showing up as STM32 Bootloader. No luck. And of course just hitting ‘upload’ again in Arduino doesn’t work.

The Micro-USB to USB-C adapter was one of my guesses, I think I should try to get a detailed wiring diagram from Sabertrio and also try bypassing it and going Micro-USB to see what happens. Just takes a little disassembly of their sealed powercore chassis.

Another possibility may be the SD card.
Crashing or freezing the SD card, or even getting stuck in the middle of a command can cause these sort of problems, and proffieos does not handle it well if the SD card is stuck.

If you have another SD card, maybe try it and see if it works better.
It’s just a guess, because I don’t know what is happening, but it could be the sd card…

Yep, I should try that first. I did notice recently that if I turn on mass storage (usually don’t) it’ll mount and show me the files, but if I copy literally anything to the card, it will be corrupted and need to be pulled and formatted. I figured that was a driver or software problem since it’s only a few months old, but maybe not.

That’s not normal.
Do you make sure to use “eject safely” before disconnecting? (also, before programming the board)

All if this is much easier in 8.x where you can have mass storage on, but prevent it from getting mounted on the computer until you say so…

I do safely eject, doesn’t make a difference.

I love that feature in v8, only switched back to 7 because I wasn’t that into the BC Saber prop. Can’t wait until 8 goes to full release.

Weird.
I wonder why?
(or even how)

I’m really not sure. Random symptom of a bad card? Folders will be deleted, other folders will have gibberish characters for names. It’s consistent, I can’t use mass storage because it happens every time. But the SD card does work flawlessly otherwise, and passes serial monitor SD test with flying colors (it’s a decent card, came with the saber from Sabertrio).

First, let me double-check something: After selecting “eject safely”, do you wait for it to finish ejecting? It can take several minutes, possibly even hours if you made a lot of changes to the card.

If you did wait for it, then I don’t know what the problem is. I’ve never heard of an SD card that always ends up corrupted with mass storage. If the board is able to read from the card, it really ought to be able to write too, the difference isn’t that big really… Either the SD card or the board would need to be broken in some weird way…

Haha nope, I have always waited several seconds. Never knew about that. So I can trust that even if it takes an hour, Windows will eventually pop the little notification that it’s safe?

Your expectation should depend on how much you copy.
Something like:

1 file => a few seconds
1 font => a few minutes
20+ fonts => an hour or so

If it takes significantly longer than that, then something may have happened.
In general, if you need to copy more than a small number of fonts, pulling the SD card out and using a proper sd card reader is going to save a lot of time.

I’m going to dig into this after I get my SD card practices straight, and see what I find. Thank you for the tips!