S32K 144 LPUART Receive Interrupt could not generate

cancel
Showing results for 
Search instead for 
Did you mean: 

S32K 144 LPUART Receive Interrupt could not generate

Jump to solution
479 Views
KILLERzheng
Contributor III

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 Kudos
1 Solution
298 Views
KILLERzheng
Contributor III

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

 

View solution in original post

0 Kudos
9 Replies
426 Views
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 Kudos
416 Views
KILLERzheng
Contributor III

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 Kudos
410 Views
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 Kudos
400 Views
KILLERzheng
Contributor III

here is the MCAL project

0 Kudos
406 Views
KILLERzheng
Contributor III

I did enabled the DMA interrupt and the handler

 

KILLERzheng_0-1643252059864.png

KILLERzheng_1-1643252102994.png

 

0 Kudos
309 Views
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 Kudos
299 Views
KILLERzheng
Contributor III

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 Kudos
447 Views
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 Kudos
437 Views
KILLERzheng
Contributor III

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 Kudos