S32K 144 LPUART Receive Interrupt could not generate

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

S32K 144 LPUART Receive Interrupt could not generate

跳至解决方案
2,369 次查看
KILLERzheng
Contributor IV

Hi NXP,

I create a project for S32K144 base on platformSDK_S32K1_2021_08_S32K144_M4F, and configured the MCAL which the LPUART transmit via DMA. The tx Interrupt could generate but when I send massage to MCU via other tool, the Rx interrupt could not generate. Now I could not receive uart message with non-blocking way.

Is there any way to deal with it?

Thanks!

0 项奖励
1 解答
2,188 次查看
KILLERzheng
Contributor IV

I have solved this problem.

the IDLE interrupt is not be handled by MCU because of the RTD in function "Lpuart_Uart_Ip_IrqHandler", so I add the idle interrupt handle code as below and other related code, so it could works

KILLERzheng_0-1645666965039.png

 

在原帖中查看解决方案

0 项奖励
9 回复数
2,316 次查看
namnguyenviet
NXP Employee
NXP Employee

Hello,

You don't need to enable the Scatter/Gather. Please follow part 3.3.3 DMA configuration in the RTD_UART_IM.pdf file to configure the UART transmission using DMA method (It's for EB Tresos but the same things are apply to S32 Design Studio - DMA_IP)

0 项奖励
2,306 次查看
KILLERzheng
Contributor IV

I did what the IM manual said, the configuration as below. It still could not  generate the receive interrupt unless I call the receive function forwardly. 

On the other hand, the configuration of  Transfre Container is the default setting, is there any reference for that how to configure this container ? 

KILLERzheng_2-1643249742207.png

 

KILLERzheng_0-1643249690262.png

KILLERzheng_1-1643249699929.png

KILLERzheng_3-1643249761731.png

 

 

 

0 项奖励
2,300 次查看
namnguyenviet
NXP Employee
NXP Employee

Did  you enable and configure the DMA interrupt handler accordingly? I supposed you don't need to configure the transfer config since they are configured internally in the LPUART driver. What you need to do is configuring the DMA HW logic instance in Global tab based on what is written in the IM.

0 项奖励
2,290 次查看
KILLERzheng
Contributor IV

here is the MCAL project

0 项奖励
2,296 次查看
KILLERzheng
Contributor IV

I did enabled the DMA interrupt and the handler

 

KILLERzheng_0-1643252059864.png

KILLERzheng_1-1643252102994.png

 

0 项奖励
2,199 次查看
namnguyenviet
NXP Employee
NXP Employee

Sorry for late reply. I haven't had chance to check your project yet. You can debug by set a breakpoint in the interrupt handler function of DMA, then check whether the breakpoint can be hit. 

Best Regards,

Nam

0 项奖励
2,189 次查看
KILLERzheng
Contributor IV

I have solved this problem.

the IDLE interrupt is not be handled by MCU because of the RTD in function "Lpuart_Uart_Ip_IrqHandler", so I add the idle interrupt handle code as below and other related code, so it could works

KILLERzheng_0-1645666965039.png

 

0 项奖励
2,337 次查看
namnguyenviet
NXP Employee
NXP Employee

Hello,

You can verify whether you have configured the interrupt correctly. Also, please make sure that the RX pin was configured with its appropriate mode. Last but not least, measure the bus to verify the receipt UART signal.

You can refer to the example of UART along with the package to have an overview of UART driver usage.

Best Regards,

Nam

0 项奖励
2,327 次查看
KILLERzheng
Contributor IV

The interrupt configuration is correct, and it could receive message sometimes which asks me to Receive forwardly. 

I am confused that how to configure the Dma Logic Channel Rx  of MCL instance in EB, should I enable the Scatter/Gather, and if so, how to configure this part?

0 项奖励