AnsweredAssumed Answered

How is the proper way of recovering from a UART overrun condition in STM32F030R8T6 ?

Question asked by Marcelo Barros on Apr 17, 2016
Latest reply on Apr 19, 2016 by Marcelo Barros
Hello,

We are using a discovery kit based on STM32F030R8T6 uC and facing a strange condition. When using both serials (UART1 and UART2), both in interrupt mode, there is a overrun error happening from UART1 and we can't recover from such situation.

Some info:

- use a using the latest HAL available in Cube
- we are handling error/rx/tx callbacks as specified in hal documentation
- both serials are running at 115200bps
- uC is running at 48MHz
- we are using interrupt mode for both serial, tx and rx
- when using only serial1 or serial2 the problem does not occur
- our IRQ are following the order: systick(0)/uart1(1)/uart2(2)
- uart1 is rs232, uart2 is rs485

I did several changes, without success. The last ones:

- in error callback, we read the DRD if RXTE is enabled and we started a new interrupt programming (there is a hint about this in manual): no success
- we tried to clean several interrupt error indications like we can see searching in this forum (http://is.gd/QrGiDE)

After the first overrun, the serial1 stops to work. We think the problem is related to the way we cleanup the messy and restart the serial1.

Could you provide some light over this topic ?

Thanks a lot

Marcelo

Outcomes