2022-01-12 02:04 AM
What does it mean ->( the bootloader code
begins to scan the USARTx_RX line pin, waiting to receive the 0x7F data frame: a start bit,
0x7F data bits, even parity bit and a stop bit.)?
I'm totally confused understanding this line, how to configure it? where & when should I send the 0x7F frame to get the bootloader commands?
2022-01-12 02:11 AM
Hello,
System bootloader within each STM32 is programmed to serve couple of USART interfaces. Complete list of them for particular MCU you can find within application note AN2606. Knowing this you can select any of USART_RX lines and send there serial data within specified bitrate (specified in AN2606 as well) keeping even parity and single stop bit within frame settings. This 0x7F value is used to detect the bitrate by the build it bootloader After this next frames can be properly received by the bootloader on selected interface.
I hope it clarifies your doubts.
Best Regards,
Artur
2022-01-12 02:16 AM
You can send 0x7F from serial terminal. This demonstration program https://www.st.com/en/development-tools/flasher-stm32.html is sending 0x7F during connection, you can observe it using serial port monitor (sniffer). Bootloader receive multiple 0x7F and measure square wave duration (bits of 0x7F are 0b1111111). Based on this duration actual USART baud rate is estimated/calibrated.
Where: send 0x7F to computer COM port which is connected to USART pin, for example through USB2COM / USB2TTL converter. When: right after powering on or resetting