S32K144 UART could not enter into LPUART_DRV_IRQHandler

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

S32K144 UART could not enter into LPUART_DRV_IRQHandler

1,362 次查看
玉敏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 项奖励
回复
2 回复数

961 次查看
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 项奖励
回复

961 次查看
玉敏111田
Contributor III

Thanks you.I have solved it.

0 项奖励
回复