cancel
Showing results for 
Search instead for 
Did you mean: 

USART 230400 baudrate in stm32L controller

amandeep
Associate II
Posted on August 12, 2014 at 11:44

Hi , i am unable to obtain the 230400 baudrate. i am able to attaiin only 115200.

please help me with the sample code . i am using usart3 of stm32l152xD controller

#usart3 #baudrate #230400
6 REPLIES 6
aruns06
Associate II
Posted on August 12, 2014 at 12:29

Are you trying to interface stm32l152xD controller with any external device? specify reception and transmission parts

amandeep
Associate II
Posted on August 12, 2014 at 13:33

hi arun

i am using tera term in the pc side to receive and send data through rs232 TTL Logic .

is 230400 baudrate is possible at usart3 .

if yes what should be the clock setting for it .

thanks .

Posted on August 12, 2014 at 13:42

Running faster than 4 MHz should be sufficient, the higher the better.

Send a stream of characters and verify the signal on a SCOPE, this way you'll be able to determine where the problem is.

Is your PC serial port capable of 230400? The STM32 certainly should be capable of much higher rates. Look for downstream issues.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
aruns06
Associate II
Posted on August 12, 2014 at 13:55

Also, let me know the type of cable(Name and whether the cable is original or not) to connect with you PC.

amandeep
Associate II
Posted on August 12, 2014 at 14:12

The original post was too long to process during our migration. Please click on the provided URL to read the original post. https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I6fy&d=%2Fa%2F0X0000000bt0%2Fy2llerIw7r9bHLE3MjzpgR0R4T8IGfdtgOxq_romVX4&asPdf=false
Posted on August 12, 2014 at 16:43

yes my pc serial port is capable of 230400 baudrate , i have verified this with the loopback .

That's a bit self-referential, the Rx/Tx share a common clock which could be anything. The STM32L would likely pass that test. Use a SCOPE and measure the bit timing, then you'd know.

Your APB2 clock CAN'T be DIV16, it must be at least as fast at APB1, and 12 / 16 is BELOW the 4 MHz number I mentioned earlier.

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