cancel
Showing results for 
Search instead for 
Did you mean: 

External Clock Problem

Eray Eray
Associate
Posted on January 04, 2017 at 09:39

Hi,

   I am using STM32CubeMX and I want to use external crystal for clock. However, I face some problems,

1) I set Baudrate 9600 for uart2 and send data to computer but in computer I can read the data with 4800 baudrate via teraterm.

2) I use bluetooth module(HC-06) and I set baudrate 9600 for uart1 but I cannot read this data any baudrate.

   I think, STM32CubeMX cannot set their clock frequencies.

    Is there anyone face same problem or how can I fix this ? Any ideas ?

   I use L053r8 chip

#external-clock
1 REPLY 1
Nesrine M_O
Lead II
Posted on January 04, 2017 at 11:27

Hi

Kacar.Eray

‌,

  • Have you try toOutput SYSCLK on MCO pin to be sure about your clock settings?

  • Could you please check the

    Baud rate register (USART_BRR)?

  • could you please precise the over sampling method that you use?

  • The auto baud rate detection mode is activated in your case?

  • I recommend you to have a look to these examples to have idea about USART

    settings:

    STM32Cube_FW_L0_V1.7.0\Projects\STM32L053R8-Nucleo\Examples\UART

-Nesrine-