Hi Designer11,
Do you just want to get the receive idle interrupt?
If yes, you don't need to use RAF to get the interrupt, because RAF is just the state flag, it doesn't have the interrupt.
You should enable the idle line request in UARTx_C2[ILIE].
About the example, I help you use the KDS PE generate a K64 project, and test it on my side, it works ok on my FRDM-K64 board, you can refer to it.
The code function is, when the receive idle interrupt happens, it will clear the idle flag, and receive the UART data, then send the received data back.
The configuration is like this:


The main code like this:
unsigned char data, flag=0;
PE_ISR(UART_ISR)
{
if(UART0_S1 & UART_S1_IDLE_MASK)
{
data= UART0_D;
flag=1;
}
}
void send_data(char ch)
{
while(!(UART0_S1 & UART_S1_TDRE_MASK));
UART0_D= ch;
}
int main(void)
/*lint -restore Enable MISRA rule (6.3) checking. */
{
/* Write your local variable definition here */
/*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
PE_low_level_init();
/*** End of Processor Expert internal initialization. ***/
/* Write your code here */
/* For example: for(;;) { } */
send_data(0x55);
for(;;) {
if(flag==1)
{
flag=0;
send_data(data);
}
}
} /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/
More details, please check my attached project.
Wish it helps you!
If you still have question, please let me know!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------