AnsweredAssumed Answered

Slow stm32f4 serial bootloader

Question asked by grauman.joshua on Sep 16, 2016
Latest reply on Sep 16, 2016 by Clive One
Hello all,

I created a board for a STM32F411 that I program using the serial bootloader. It works great, except that since I am programming it over bluetooth, it is extremely slow (over 3 minutes to upload a 100k .bin file even at 115200 baud). I believe this is because of the latency of programming over bluetooth. I read in AN3155 that "The maximum length of the block to be written for the STM32 is 256 bytes." There is handshaking in between each block written, and having to do this over bluetooth makes it very slow to program the chip. When I program the same program with a USB-to-serial converter at the same baud rate, it programs much faster. Increasing the baud rate doesn't really help the overall programming speed. It is all the time handshaking over the air every 256 bytes that is taking up all the time.

So, I'm wondering if there is any way to modify the default serial bootloader to increate the maximum block size that can be written at once?

Or, if I need to write my own bootloader, ideally it would seamlessly replace the existing one, except have a bigger maximum block size. Are there any sample bootloaders as I don't have any experience with writing one? Is the code for the included one available and how would I use it?

Any/all help is appreciated. Thanks. 

Outcomes