cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F407 UART ORE Problem

hossam
Associate II
Posted on December 11, 2014 at 13:27

Hi

We have developed an applicaion using on  STM32F103 UART using the standard peripheral library and it was working fine.

recently we ported our application to STM32F407 running @ 168MHz.

Since then We are missing the received data and still getting ORE error, our UART baud rate is 9600

on STM32F103 I was using the std peripheral library and for STM32F407 I sued Cube MX for initialization and STM32Cube_FW_F4_V1.3.0 for driver

Here are the values of the registers before the error and after the error

SR = 248, DR= 42, BRR = 651, CR1=8204, CR2=0, CR3=0, GTPR=0

and these are the values after the error

SR = 208,DR= 10,BRR = 651, CR1=8236, CR2=0, CR3=0, GTPR=0

IS there any suggestions to overcome this problem

I think of either re-implemeinting the ISR and avoid using the STM32Cube library or use DMA.

What do you think

#stm32f07-uart-ore-cube-interrupt
1 REPLY 1
Posted on December 23, 2014 at 11:20

Hi Hossam,

The values of the SR regsiters before and after the encountred error are: 

SR = 248 = 0xF8 (TC, TXE, RXNE, OVR, IDLE)

SR = 208 = 0xD0 (TC, TXE, OVR)

My proposal is to check the following scenarios that may cause the error you've found:

  1. May be the UART baud rate is not configured correctly, please double check the BRR configured value è the OVR flag can be set if Transmitter and Receiver don’t use the same communication baud rate. 
    • Double check the system clock configuration
    • If you use the default system clock configuration: On F1, The BRR value is evaluated using APB Frequency= 36MHz but for F4, The BRR value is evaluated using w/ APB Frequence = 42MHz
    • This proposal is confirmed, if you can confirm that the transmit process too is not working?
  2. Synchronization issue: please ensure the receiver is ready before starting the transmitter
  3. Ensure to clear the UART DR register before starting the HAL_UART_Receive() process => if the UART transmitter continues to send data on the bus when the receiver is not yet ready: This issue can be fixed, by calling this HAL macro before starting the receive process__HAL_UART_FLUSH_DRREGISTER() 
Please try to go through my proposal, and keep us informed about your finding.

Regards,

Heisenberg.