Skip to main content
Explorer II
February 10, 2025
Solved

Expected Speed of Flashing over USART

  • February 10, 2025
  • 3 replies
  • 835 views

Hello, 

I am currently flashing an STM32F767 via the USART. I have no problems getting the device into DFU mode, initiating the flashing (Using STM32CubeProgrammer or stm32flash), etc., but the flashing time is between 6 and 7 minutes for the 1.3MB firmware image even at the maximum guaranteed baud of 115200. Having never utilized this flashing interface before, I'm not sure if this is expected.

I was wondering if anyone knew if there were strategies to speed up the flashing over USART and/or an expected size vs flash time one could expect in this configuration?

For reference, all my testing is being done on the NUCLEO-F767ZI via pins C11 and C10 using USART. 

Thank you,

-Brian

This topic has been closed for replies.
Best answer by TDK

The math suggests the minimum time would be 1.3MB / (115200*.8 bit/sec), or about 2 minutes. You can't possibly get better than that and due to the back and forth in the bootloader protocol, there is going to be substantial overhead.

6-7 minutes seems reasonable.

3 replies

Pavel A.
February 10, 2025

> I have no problems getting the device into DFU mode

Confused? DFU is not UART, it is the USB interface mode. STM32CubeProgrammer supports both modes, and more.

>  at the maximum guaranteed baud of 115200

115200 is a common baud rate, but not very performant. Better use the USB interface (DFU or whatever available).

If you can flash using the ST-LINK on the Nucleo board, this may be the best option.

 

 

Tesla DeLorean
Guru
February 11, 2025

You could also stage code in RAM if you write to ST's protocol, and push something more efficient, self-pacing and robust. Like X or Y-Modem

Or commit a flash sector to a boot-loader supporting a standard protocol, from a terminal application sense, and that could support internal and external memorys.

ST has had a couple of IAP (In-Application Programming) examples

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
TDK
TDKBest answer
February 11, 2025

The math suggests the minimum time would be 1.3MB / (115200*.8 bit/sec), or about 2 minutes. You can't possibly get better than that and due to the back and forth in the bootloader protocol, there is going to be substantial overhead.

6-7 minutes seems reasonable.

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