I'd like to bump this question. Mark - thanks for the reply. Your procedure seems to essentially the same as what I'm doing, but still the UART overruns are causing the UART to eventually stop receiving RX interrupts.
Here's what I'm seeing:
1) UART RX is working
2) Eventual buffer overrun or framing error
3) UART5_OnError function is hit. UART5_OnError clears error flags.
4) PE_ISR(Cpu_ivINT_UART5_ERR) is hit. I've commented out PE_DEBUGHALT() and replaced with a printf call.
5) Soon after, PE_ISR(Cpu_ivINT_UART5_ERR) is hit without UART5_OnError being executed. (Why is the PE_ISR triggered twice, while UART5_OnError is only triggered once?)
6) UART5 fails to receive any incoming bytes.
Why is this happening? I am:
a) clearing error flags in the interrupt
b) flushing buffer in the interrupt
c) flushing before before and after any large transfers
So I don't see how the UART is getting into what looks like a permanent RX buffer overrun state. Even if it temporarily overruns, it should eventually flush and start up again.
Would appreciate some support from NXP on this one. Thanks.