cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with USART since CubeMX 1.14.0+ Package for L4 released

kurta999
Senior

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?

1 REPLY 1
Guenael Cadier
ST Employee

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