cancel
Showing results for 
Search instead for 
Did you mean: 

Bootloader UART selection

n.serina
Associate III
Posted on September 08, 2017 at 06:25

Hello , 

In this picture Bootloader of stm32f446X tries to read 0x7f from the usart without initializing  the usart. how that is possible ? it configures the USART later. am i missing something ?

also why 0x7f is chosen ? any reason behind this ?

I am guessing bootloader does not read 0x7f from the USART data register, please clarify .. Thank you 

0690X00000608ASQAY.png 

#stm32 #stm32-bootloader
2 REPLIES 2
Nesrine M_O
Lead II
Posted on September 08, 2017 at 10:40

Hi

n.serina

,

In this picture Bootloader of stm32f446X tries to read 0x7f from the usart without initializingthe usart. how that is possible ? it configures the USART later. am i missing something ?

also why 0x7f is chosen ? any reason behind this ?

Once the system memory boot mode is entered and the STM32 microcontroller has been configured the bootloader code begins to scan the USARTx_RX line pin (used as GPIO to detect the edge: USART not yet configured) , waiting to receive the 0x7F data frame: one start bit, 0x7F data bits, even parity bit and one stop bit.

The duration of this data frame is measured using the Systick timer. The count value of the timer is then used to calculate the corresponding baud rate factor with respect to the current system clock.

I recommend you to refer to

http://www.st.com/content/ccc/resource/technical/document/application_note/group0/66/fa/62/a2/5c/75/48/a8/DM00327191/files/DM00327pdf/jcr:content/translations/en.DM00327pdf

(Software automatic baud rate detection) and

http://www.st.com/content/ccc/resource/technical/document/application_note/51/5f/03/1e/bd/9b/45/be/CD00264pdf/files/CD00264pdf/jcr:content/translations/en.CD00264pdf

applications note.

-Nesrine-

Posted on September 08, 2017 at 13:56

Seem to recall them using the pin as a TIM input, SysTick not really having sufficient granularity. 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..