Hi PetrS
Thanks for your reply
I'm testing the UART callback function by enabling UART loopback mode.
I can receive the UART_Callback event, but the LPUART_UART_IP0_IRQHandler function is not being executed.
I have some questions regarding this setup:
1. Where can I set the LPUART_UART_IP_EVENT_RX_FULL value?
2. If the UART event is triggered, what is the purpose of the LPUART_UART_IP0_IRQHandler function?
3.If UART loopback mode is not enabled and I use another UART TX to send data to the S32K118 RX,
I am unable to receive the LPUART_UART_IP_EVENT_RX_FULL event.
here is my testing function
void sendstring(char* string)
{
Lpuart_Uart_Ip_AsyncSend(UART_LPUART_INTERNAL_CHANNEL, string, strlen(string));
}
void UART_Callback(const uint8 HwInstance, const Lpuart_Uart_Ip_EventType Event, void *UserData)
{
if(HwInstance == UART_LPUART_INTERNAL_CHANNEL)
{
switch(Event){
case LPUART_UART_IP_EVENT_RX_FULL:
sendstring("LPUART_UART_IP_EVENT_RX_FULL\r\n");
ISR_UART = 1;
break;
case LPUART_UART_IP_EVENT_TX_EMPTY:
sendstring("LPUART_UART_IP_EVENT_TX_EMPTY\r\n");
break;
case LPUART_UART_IP_EVENT_END_TRANSFER:
//sendstring("LPUART_UART_IP_EVENT_END_TRANSFER\r\n");
break;
case LPUART_UART_IP_EVENT_ERROR:
sendstring("LPUART_UART_IP_EVENT_ERROR\r\n");
break;
//case LPUART_UART_IP_EVENT_IDLE_STATE:
//break;
default:
break;
}
}
}
void LPUART_UART_IP0_IRQHandler()
{
sendstring("LPUART_UART_IP0_IRQHandler\r\n");
}
I would greatly appreciate any advice you can provide. Thank you!