cancel
Showing results for 
Search instead for 
Did you mean: 

Setting up the Clock for HSE 16mhz and usart2 baudrate is lower as configured

sam239955
Associate II
Posted on December 06, 2011 at 21:27

hi,

I have a stm32f103zet6 board and im using keil. the external crystal (HSE) has 16mhz.

When im setting up my USART2 @ 38400bau in Keil Debugger it shows me that its running with 12668 baud ??? (=38400/3,19).

Where is my fault? With the Eval board from keil everything seems to be allright (but it has 8mhz HSE).

Here is my code:

 Please help.

Is my PLL/RCC Setup correct?  I want to use USB as VCOM too.

11 REPLIES 11
sam239955
Associate II
Posted on December 09, 2011 at 00:14

hi clive,

thanks! I attached the project as a zip-file. The archive password is ''stm32''.

And btw. can you take a look at the retarget function (for communicating via keil-debug-window with the bluetooth device which is connected to the uasrt2)?

with regards!

Posted on December 09, 2011 at 04:56

Try these

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