2020-05-18 10:05 AM
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?
2020-05-18 11:38 PM
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