Skip to main content
Mike Ciholas
Associate II
May 8, 2023 3:37 PM UTC
Question

Maximum baud rate for serial bootloaders

What is the maximum reliable baud rate that the serial bootloader will operate at?

I am aware than AN3155 says that the max tested is 115200 but that's too slow for the production rates we need. How much faster can it go? I would like to go at least 1 Mbs, and would prefer 2 Mbs if possible.

I presume the autobaud feature is being used in mode 2 (looking for 0x7f, the most accurate baud measurement). Assuming an oversample of 16, then a baud rate of the clock divided by 16 should be the maximum. Perhaps best not to operate right at the maximum.

The parts in use and what I think they should be able to do:

STM32G070, 24 MHz clock, USARTDIV of 24 is 1 Mbs

STM32U535, 60 MHz clock, USARTDIV of 30 is 2 Mbs

STM32H723, 66 MHz clock, USARTDIV of 33 is 2 Mbs.

Are those possible and workable?

Apologies, I don't have test boards where I can check this, so I am looking for anyone with field experience or knowledge of this.

Thanks.

This topic has been closed for replies.

5 replies

Tesla DeLorean
Guru
May 8, 2023 3:54 PM UTC

I can't say I've pushed it.

Many run from the PLL, and the BRR has some fractional configuration.

It's measuring the 0x7F 8E1 pattern with a TIM, so as long as it's clean it will auto-baud well.

You could scope the 0x79 response.

It's one-shot, you can reset and try again.

Many RS232 level converters are band width limited, top-end ones often around 1Mbaud

I don't care for the protocol, and writing flash generally stalls the micro.

Would suggest staging, push something a little smarter into RAM, that can do flow-control, and execute that.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
AScha.3
Super User
May 8, 2023 4:01 PM UTC

>too slow for the production rates we need

shure - this is just bootloader , but for production there are many tools... but not for free !

here is a list:

https://www.st.com/en/development-tools/hardware-debugger-and-programmer-tools-for-stm32/products.html

look, which is making the speed you want - and buy. :)

ie. : FlashRunner High Speed

  • to connect up to 8 HS Active Modules;
  • Communication frequency towards device up to 50MHz;
  • 256 GB on-board eMMC memory;

If you feel a post has answered your question, please click on " Best Answer ".
Mike Ciholas
Associate II
May 8, 2023 4:02 PM UTC

Must do this over UART, alas, so no SWD or other programmer applies.

Mike Ciholas
Associate II
May 8, 2023 4:04 PM UTC

Staging another program in RAM is looking like the best tactic, but something else to write and debug.

Tesla DeLorean
Guru
May 8, 2023 4:25 PM UTC

Well the path to speed is to be able to slip-stream the data, and write somewhat concurrently.

The system loader deals with small blocks in a bang-bang fashion it's not designed for speed or integrity.

Pick a more industry standard protocol, will probably half the work/effort.

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