How to detect STM32 CubeMX Programmer from my application
I am developing an application on the Seeed Lora-E5 module, which contains an STM32WLE5.
Currently I am programming the device via the SWD interface, but for future firmware updates I want to use the UART, (this UART is available externally through a USB-UART chip).
The problem now is how to make the device switch to the internal bootloader : unfortunately the Boot0 (PH3) PIN on the STM32WLE5 is NOT made available on the package of the Seeed Lora-E5 module, so I cannot use that pin..
From the AN3155 I see that the CubeMx Programmer is sending 0x7F to the UART, in order for the MCU to select the UART as programming interface.
So here is my idea : after reset, I could listen to the UART for eg. 30 seconds, and if in this time a 0x7F byte arrives, jump to the bootloader. (if the 30 seconds expire, the device starts in normal operation mode).
I am aware that the bootloader expects the MCU in the same state as after reset, so I will take that into account, be resetting already configured UART (and other modified peripherals)
Does this make sense ? Any comments ? Did anyone try this ?
Thank you!
