Question
baudrate generation on stm32f4
Posted on October 07, 2014 at 13:37
Hi list,
page 932 of the reference manual gives a formula to calculate USARTDIV. But if I check the first entry in table 133 I get completely different values. With Pclk=8MHz I get 8.10^6/(16*1200)=14.7, while the table says 416.6875. I also have a working system that uses 115200 as baudrate, and if I do printf('' pclk1 %d en BRR %x\r\n'', RCC_ClocksStatus.PCLK1_Frequency, USART2->BRR); I get Pclk = 42MHz and BRR = 0x1117. And 42.10^6/(16*273.44) = 1272654.6 Completely different from 115200 What am I doing wrong? Sietse