S32K3 LPUART using DMA in RTD 3.0.0 on MACL

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

S32K3 LPUART using DMA in RTD 3.0.0 on MACL

327 Views
iverson3ya
Contributor III

I already refered to https://community.nxp.com/t5/S32K/S32K3-LPUART-using-DMA-in-RTD-3-0-0/td-p/1737356, but I am still stuck at 'UART_STATUS_OPERATION_ONGOING' when sending data. My external UART device has already received the data, and I need to manually trigger a timeout to proceed with the next transmission.

When testing data reception, it also shows 'UART_STATUS_DMA_ERROR'. Could you please help identify the issue? I have already configured the interrupt.

My project is relatively large and uses FreeRTOS. However, I have already moved the test UART to main.c for testing, but the result remains the same.

thanks

0 Kudos
Reply
5 Replies

301 Views
iverson3ya
Contributor III

I changed the DMA callback function names to "Lpuart_1_Uart_Ip_DmaTxCompleteCallback" and "Lpuart_1_Uart_Ip_DmaRxCompleteCallback", and the transmission works successfully.

However, when receiving data, it triggers "LPUART_UART_IP_STATUS_DMA_ERROR". How can I resolve this issue? The transmission is normal.

thanks

0 Kudos
Reply

299 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @iverson3ya,

I have gone through the configuration but I don't see any issues, except that the PLL clock is not set precisely to Clock Option A  (RM, Table 151. Option A - High Performance mode (CORE_CLK @ 160 MHz)).

There is a lot of dependencies and I can't compile it. Can you replicate it in a test project?

I'm attaching an example for a reference.

 

Regards,

Daniel

 

 

0 Kudos
Reply

239 Views
iverson3ya
Contributor III

Hi, @danielmartynek 

 

I found the issue.

I decleared the RX buffer in DTCM, which caused it to not work properly.

Thank you for your help!

 

 

257 Views
iverson3ya
Contributor III

Hi danielmartynek

 

I forgot to enable the DMAMUX_0 clock in the example you provided.

Currently, your example is running normally and behaving as expected.

However, I still can't figure out why my own project is not working properly

 

thanks

0 Kudos
Reply

290 Views
iverson3ya
Contributor III

 

I used the example you provided and changed it to UART1, but when running the initialization, it crashed at the point shown in the image below

iverson3ya_0-1741946442358.png

0 Kudos
Reply