AmpliPi icon indicating copy to clipboard operation
AmpliPi copied to clipboard

Robustify firmware programming when expansion units present

Open Lohrer opened this issue 1 year ago • 1 comments

Programming seems to succeed less often the more expanders that are connected.

Blocked on getting 2 expanders of the latest hardware.

Lohrer avatar Dec 22 '23 21:12 Lohrer

I've got hardware to test this so I'm investigating the cause now.

Lohrer avatar Feb 20 '24 15:02 Lohrer

Looks like this is due to debug messages that were enabled in the last release. Turns out the STM32 micro's bootloader can be initialized through either UART, so if the right character is sent at the right time by a downstream expander then the bootloader will think the downstream port should be initialized for communication instead of the upstream port. Only a reset can get out of that state and back to the bootloader waiting for a message on either port.

So the fix for future boards is to separate debug and release builds and disable messages on release builds.

For the couple units with the already shipped preamp 1.7 firmware, the solution is to robustify firmware programming, basically retry programming if a failure occurs.

Lohrer avatar Mar 11 '24 21:03 Lohrer