Skip to main content
devtty
Associate III
July 22, 2021
Question

STM32L476RG perform a DFU via UART from another board

 Hello all, I'm pretty stuck and could use a pointer in the right direction. I have a nucleo communicating with another board via UART. I would like to be able to update the application on the nucleo board via UART from the other board. Is there any example somewhere on kicking off the bootloader (buttonless)/ nor moving any jumpers. I have read some docs on the USART bootloader sequence but it looks like that requires a strange pattern of moving jumpers around (see attached image). I cant find much more than that.0693W00000D0OTJQA3.pngperhaps I need to start looking at some template bootloader code and toying with writing my own?

Thanks and sorry for the n00bness

This topic has been closed for replies.

15 replies

TDK
July 22, 2021

You can jump to the bootloader in firmware (This is H7, but L4 is similar):

https://community.st.com/s/article/STM32H7-bootloader-jump-from-application

But if you don't have firmware that already does this, no, there's no way to get into the bootloader other than BOOT pins (or a debugger).

The patterns are not that complicated. Under typical circumstances, hold BOOT0 high during reset and it will start the bootloader. Option bytes can change this as detailed in AN2606.

"If you feel a post has answered your question, please click ""Accept as Solution""."
devtty
devttyAuthor
Associate III
July 30, 2021

Thanks that works. Managed to communicate with the bootloader as well using the commands in AN3155.

As a follow up, I am not finding much on how to update the firmware/application via UART. Mainly, I am not sure on how a firmware update should be packaged to send via UART. Is it possible to send the contents of a .bin file to the stm32 via UART store it and write it to flash then jump to the bootloader to run it? Is this process on the right track? Is there some other way this is normally done? I have read some docs on IAP with stm32 but they all just use Tera Term on a PC which doesn't really help me understand how the binary file is being sent.

Sorry for the barrage of questions!

Thank you.

TDK
July 30, 2021
Stm32cubeprogrammer can connect over uart and do all of the normal things.
"If you feel a post has answered your question, please click ""Accept as Solution""."