S32K144 UART could not enter into LPUART_DRV_IRQHandler

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32K144 UART could not enter into LPUART_DRV_IRQHandler

1,258 Views
玉敏111田
Contributor III

LPUART_DRV_Init(INST_LPUART2, &lpuart2_State, &lpuart2_InitConfig0);//Initial UART2

but when the upper computer send the data to S32K144 ,the s32k144 could not enter into LPUART_DRV_IRQHandler?

You must use the LPUART_DRV_ReceiveData(uint32_t instance,uint8_t * rxBuff,uint32_t rxSize)and the IRQ can ener into.

0 Kudos
2 Replies

857 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Hello,

If you want to define receive interrupt routine you can install callback function like below: LPUART_DRV_InstallRxCallback(INST_LPUART2, MyRxCallbackFunction, NULL)

void MyRxCallbackFunction(void *driverState, uart_event_t event, void *userData)
{
    //your code
}

After that MyRxCallbackFunction will be called on each rx event.

I hope it helps you.

Best regards,

Diana

0 Kudos

857 Views
玉敏111田
Contributor III

Thanks you.I have solved it.

0 Kudos