cancel
Showing results for 
Search instead for 
Did you mean: 

Expected Speed of Flashing over USART

bcoghlan
Associate

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

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

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".

View solution in original post

3 REPLIES 3
Pavel A.
Evangelist III

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.

 

 

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
Up vote any posts that you find helpful, it shows what's working..
TDK
Guru

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".