2015-06-19 09:25 AM
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?STM32F4RGT6Thank you very much!2015-06-19 09:46 AM
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.2015-06-19 09:55 AM
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.2015-06-19 10:11 AM
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 50http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf
2015-06-19 10:24 AM
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.2015-06-19 11:35 AM
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 drivers2015-06-20 12:05 PM
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.