cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 bootloader USART1 only

zexx86
Associate II
Posted on June 19, 2015 at 18:25

Hello,

I have encountered issue when using STM32 bootloader, because by default it seems that it scanning all USARTs.

Unfortunately I have to use only USART1, because other USARTs are used for other purposes and can transmit lot of data all the time.

I can't turn off data stream on these USARTs.

Problem occurs when I try to jump to STM32 bootloader - it then detects data from for example USART3.

But at this time I have to use USART1 to start the communication with the bootloader, but USART3 data are faster and USART1 communication does not work at all.

So I have to allow only USART1. Is there any way how to allow scanning only on USART1?

STM32F4RGT6

Thank you very much!

6 REPLIES 6
Posted on June 19, 2015 at 18:46

As far as I'm aware it looks for USART1 and USART3, the documentation clearly states you can't have transitions on other interface pins which it might use for the System Loader. The documentation breaks down exactly which pins it uses.

You'd need a custom boot ROM to behave differently, and I don't see that as a forthcoming solution.

If external circuitry is workable, then you'd gate those other pins.

You could use SWD/JTAG to put you're own loader in the front of FLASH, and it could behave exactly how you want it too.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
zexx86
Associate II
Posted on June 19, 2015 at 18:55

Thank you.

I am developing own bootloader, but I have thought it could be fixed in some way.

For example by blocking USART3 initialization or to set some bits in the bootloader.

Posted on June 19, 2015 at 19:11

You could make the external device(s) shut-up.

If your programming strategy gives you control of the BOOTx and NRST pins, you may also have a window of opportunity before the other devices start interfering. But I have no insight into your design.

See Table 50

http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
zexx86
Associate II
Posted on June 19, 2015 at 19:24

I can only flash the firmware with STM32 bootloader that is launched through my firmware.

I believe that changing address of the USART3 to USART1 in the bootloader could work, but it could be little bit tricky.

If it is possible to for example reconfigure USART3 to be unusable for STM32 bootloader, then it could solve the problem.
Posted on June 19, 2015 at 20:35

If it is possible to for example reconfigure USART3 to be unusable for STM32 bootloader, then it could solve the problem.

I'm pretty sure there's not a software method to altering the ROMs behaviour in the way you seek. You're going to have to revisit your pin assignments, so they are not transitioned by external circuitry. ie used for LED output drivers

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
zexx86
Associate II
Posted on June 20, 2015 at 21:05

I have redesigned board to use UART5 instead of USART3. Everything is working fine now. PD2 pin is near to PC11, so it was easy.

Thank you.