AnsweredAssumed Answered

MK26FN2M0VLQ18 Uart2 IDLE interrupt

Question asked by 张 华荣 on Mar 17, 2017
Latest reply on Mar 19, 2017 by 张 华荣

Hi,

I want to generate the  uart2 Idle Line Interrupt,the source code is below:

 

OSA_InstallIntHandler(UART2_RX_TX_IRQn, &Uart2_Idle_ISR);

UART2_C1 |= 0x04;        // Idle count start from the stop bit of previous byte

UART_HAL_SetIntMode(UART2_BASE_PTR,kUartIntIdleLine,true);   // enable the IDLE line interrupt

INT_SYS_EnableIRQ(UART2_RX_TX_IRQn);

UART_HAL_EnableTransmitter(base);
UART_HAL_EnableReceiver(base);

 

when i send the data to uart2 from the PC,the interrupt cannot generate.

 

but when i set the RXEDGIE enbale,the interrupt can generate.

UART_BWR_BDH_RXEDGIE(UART2_BASE_PTR,1);   // enable the RxD Input Active Edge Interrupt

 

How can i do it?

Outcomes