Skip to main content
kurta999
Senior
May 18, 2020
Question

Problems with USART since CubeMX 1.14.0+ Package for L4 released

  • May 18, 2020
  • 1 reply
  • 699 views

I'm using an usart driver with DMA and for some reason it doesn't work on L4 since 1.14.0 has been released. The RX buffer is always empty, DMA doesn't write anything here. I already wasted a lot of time on it and still unable to figure out what is the problem. The problem might be with overrun detection since ESP32 at startup uses different baudrate after it's initialization, but this is only my idea.

Here is my driver: https://pastebin.com/uus3ZGin

Any ideas?

This topic has been closed for replies.

1 reply

Guenael Cadier
ST Employee
May 19, 2020

Hello @kurta999​ ,

Indeed, an overrun Error flag might have been raised if data received, but not read from Read Data Register (or other error flags as Frame error, if received char does not fit the expected pattern, which might be the case, if sent at different baudrate than receiver configuration).

Could you try to read value of ISR register of your UART (for instance, at the time you start reception), and check value of NE FE and ORE flags ?

In case of Overrun error, you need to clear it before being able to receive again.

Regards

Guenael