Skip to main content
JZou.2
Associate II
July 29, 2020
Question

How to update the FW by CubeProgrammer via USART?

  • July 29, 2020
  • 2 replies
  • 1315 views

I want to update the FW to H7 MCU via its USART by embedded bootloader. It seems need to control the BOOT0 pin and nRST pin when the MCU is in normal running. By CubeProg tool, how to control above 2 pins by PC? Usually, I will build a USB to UART bridge chip for this purpose.

One thing that I can not understand well at the monment: is such a bridge chip specified by CubeProg tool or free chosen by user? I think this also related by GPIO(flow control pin) control of bridge chip.

This topic has been closed for replies.

2 replies

prain
Visitor II
July 29, 2020
  • Usually flow control take place in your hardware driver. ​for example in Windows os, CTS, RTS can be controlled automatically by os. An example circuit that may help you, would be ESP8266 module. two transistors are used to put the chip in programming mode
JZou.2
JZou.2Author
Associate II
July 29, 2020

Is CubeProg tool able to directly control such a circuit? I mean that for embedded bootloader in H7, the tool should be able to send and respond with specified words.

prain
Visitor II
July 29, 2020

Feel free to try.

If applicable, let us know

TDK
Super User
July 29, 2020

STM32CubeProgrammer can use a serial port (UART port) to communicate with the bootloader but you need to get the chip into the bootloader state first. A USB to UART bridge can't toggle BOOT0/NRST.

You can implement logic in your program to read data from the UART and jump to the bootloader when necessary, then use that same port to communicate with the bootloader. I do this, it works well.

"If you feel a post has answered your question, please click ""Accept as Solution""."
JZou.2
JZou.2Author
Associate II
July 30, 2020

Hi, USB to UART beidge chip usually have assocaited GPIOs(dedicated GPIO or flow control pins) that can be controlled by PC tools. Then you connect 2 pins of them to nRST and BOOT0 to force H7 go to reset ---> boot from bootloader(system memory).

You solution seems a new to me. Do you mean that user can force the MCU jump to bootloader when H7 is normal running?

TDK
Super User
July 30, 2020

> Do you mean that user can force the MCU jump to bootloader when H7 is normal running?

Sure, if you implement it in your code.

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

Toggling pins is also a fine solution.

"If you feel a post has answered your question, please click ""Accept as Solution""."