I'm getting UART overrun and framing errors in my application. I'd like to disable the UART error interrupts but I'm having trouble getting that to work. This is on a K22 MCU.
I've been using PE-generated code, so for UART I'm using ASynchroSerial components with lower-level ASerialLDD components. Within the ASerialLDD init function, I've replace the interrupt-enable line with interrupt-disable:
Previously was:
UART_PDD_EnableInterrupt(UART5_BASE_PTR, ( UART_PDD_INTERRUPT_RECEIVER | UART_PDD_INTERRUPT_PARITY_ERROR | UART_PDD_INTERRUPT_FRAMING_ERROR | UART_PDD_INTERRUPT_NOISE_ERROR | UART_PDD_INTERRUPT_OVERRUN_ERROR )); /* Enable interrupts */
Modified to:
UART_PDD_DisableInterrupt(UART5_BASE_PTR, ( UART_PDD_INTERRUPT_RECEIVER | UART_PDD_INTERRUPT_PARITY_ERROR | UART_PDD_INTERRUPT_FRAMING_ERROR | UART_PDD_INTERRUPT_NOISE_ERROR | UART_PDD_INTERRUPT_OVERRUN_ERROR ));
However, my code is still ending up in PE_ISR(Cpu_ivINT_UART5_ERR) when it gets framing errors or overruns.
How can I *completely* disable these interrupts?
Thanks
Alex
Hi Alexander,
Please check the value of UARTx_C3 to ensure these Error Interrupt are disabled.
Here is the Interrupt vector assignments, you can also check if the UART error sources is disabled in NVIC.
Best Regards,
Robin
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------