2023-05-08 08:37 AM
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.
2023-05-08 08:54 AM
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.
2023-05-08 09:01 AM
>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:
look, which is making the speed you want - and buy. :)
ie. : FlashRunner High Speed
2023-05-08 09:02 AM
Must do this over UART, alas, so no SWD or other programmer applies.
2023-05-08 09:04 AM
Staging another program in RAM is looking like the best tactic, but something else to write and debug.
2023-05-08 09:25 AM
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.