Skip to main content
pranathi1091
Associate III
August 2, 2013
Question

STM32 USART3

  • August 2, 2013
  • 4 replies
  • 1429 views
Posted on August 02, 2013 at 06:30

Hello All,

I am using USART3 in Half duplex mode for 1 wire protocol. The reset pulse of the one wire protocol has to be sent at 9600 and data exchnage at 115200.

The problem I am facing here is BRR register doesnt get updated with baud rates.

HSE_VALUE is 8Mhz

 SYSCLK(Hz)                             |64000000

APB1 prescalar is  16

I am not getting the proper baud rate and hence i get just 0 from 1 wire slave.

Could anyone pls help in resolving this issue .

Thanks

#usart-rcc #stm32
This topic has been closed for replies.

4 replies

stm32forum
Associate III
August 2, 2013
Posted on August 02, 2013 at 10:45

Here's an example;

http://we.easyelectronics.ru/STM32/stm32-1-wire-dma.html

jpeacock2399
Associate III
August 2, 2013
Posted on August 02, 2013 at 15:46

Not being able to change a register is often an indication hat the peripheral clock is not enabled.  Make sure you turn ont he USART3 clock in the RCC.

  Jack Peacock
pranathi1091
Associate III
August 5, 2013
Posted on August 05, 2013 at 07:46

Thanks Jack for the reply.

I have Enabled the USART 3 clock which is APB1 and 16Mhz. But still i cannot find any chnages.

RCC_APB1PeriphClockCmd(RCC_APB1Periph_USART3,ENABLE);

The other USART1 which uses APB2 (4Mhz ) is working propely

Any suggestions??

Thanks

Tesla DeLorean
Guru
August 5, 2013
Posted on August 05, 2013 at 16:21

Any suggestions??

Sorry, not guessing. Show enough code that someone could reasonably provide some suggestions.

State the processor being used here, and the reason for the APB2 to be clocked slower than APB1, not sure it won't work but does seem to be backward. APB2 should generally be the same or faster than APB1.

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