2025-03-20 3:49 AM
I'm trying my hand at a LoRa project and settled on using the STM32WLE5JC chip on Seeed studio's Wio-E5 module. I've read through the bootloader manual and Seeed studio has their own set of instructions for wiping their pre-existing code which I have gone through, but my question is in regards to after I have successfully flashed code similar to the ping-pong examples in subGHz. Specifically, is it possible to upload code using an ST-Link without access to the BOOT pin?
For reference, the module gives access to SWDIO, SWCLK, and NJRST, which I have broken out these pins along with GND and PWR, but the BOOT pin is not accessible. In my past experience using STM32, I flashed through UART which did require the bootloader and hence boot pins were the easiest way to go. From what I have read online, it seems that flashing through ST-Link doesn't require the system to be put into bootmode but would appreciate some confirmation on this. Seeed's factory firmware appears to have made a different pin function as a boot pin which makes me worry that I may never be able to re-enter the programming mode after the initial upload.
Thanks.
Solved! Go to Solution.
2025-03-20 4:18 AM
Yes, it should be possible.
@llee_2468 wrote:In my past experience using STM32, I flashed through UART which did require the bootloader .
A bootloader is code which runs to do the updating - so you need the BOOT pins to select this code, rather than the "normal" application code.
The whole point of SWD (also JTAG) is that it has direct access to the memories - so doesn't need to run any code.
Possible things which could obstruct SWD:
2025-03-20 4:18 AM
Yes, it should be possible.
@llee_2468 wrote:In my past experience using STM32, I flashed through UART which did require the bootloader .
A bootloader is code which runs to do the updating - so you need the BOOT pins to select this code, rather than the "normal" application code.
The whole point of SWD (also JTAG) is that it has direct access to the memories - so doesn't need to run any code.
Possible things which could obstruct SWD:
2025-03-21 12:21 AM
Thanks for the response!
In these scenarios, is there anything specific I should look out for or add in my code to ensure that the SWD pins are not disabled or locked out?
2025-03-21 1:51 AM
@llee_2468 wrote:is there anything specific I should look out for or add in my code to ensure that the SWD pins are not disabled or locked out?
Disabling or locking them out would be something that you do explicitly.
Common scenarios where you might want to do it:
If you find yourself in such a situation, then think about how you will connect a debugger/programmer when you need to.
Maybe have a delay after startup - before you disable/repurpose the pins - that would give time to connect...