How to disable all UART error interrupts?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to disable all UART error interrupts?

886 次查看
asfarley
Contributor IV

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

标签 (1)
0 项奖励
1 回复

591 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Alexander,

Please check the value of UARTx_C3 to ensure these Error Interrupt are disabled.

UARTx_C3 Error Interrupt.png

Here is the Interrupt vector assignments, you can also check if the UART error sources is disabled in NVIC.

Table 3-5. Interrupt vector assignments.png

Best Regards,

Robin

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励