2025-01-06 06:47 AM
Hello, everyone,
I'm using a STM32L431CC and I'm having a hard time making an OTA firmware upgrade while my device has the RDP level set to 1.
I've configured my Option Bytes on my bootloader and it appears to work correctly: the application code runs perfectly fine and I can't read the memory of my device using CubeProgrammer.
To make the OTA firmware upgrade, my device reads the saved compiled program on a external memory and writes it to the internal flash of the MCU (using HAL here with HAL_FLASH_Program, starting from the address 0x0800C000 which is where the application begins) - however, when the device restarts, the old code is still running. I have a hard time debugging it since the RDP level disallows the monitoring on CubeIDE - however, when RDP is set to AA, the upgrade works perfectly fine. We use a similar bootloader on our STM32WLE5 and it can be upgraded just fine even with the protected firmware, so we don't know if there's something about the L431 that makes it work differently.
2025-01-06 10:01 PM
Try to output debugging information (e.g. errors while programming FLASH) through UART or similar interface.
Btw. that problems occur while RDP is set may or may not be coincidental.
JW