S32K148 DMA Issues with LPUART

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

S32K148 DMA Issues with LPUART

1,293 Views
AergoXenn
Contributor II

Hi! 

I want to use eDMA functionality on S32K148 with LPUART. Basically, I am testing a use case where there is a simple transmission of a string "Hello, World!"  to the LPUART0->DATA, using the DMA feature. 

I've been following the DMA_LPSPI and DMA_LPUART examples, but I cannot make even this simple test case work with the DMA. 

The setup is simple, to have a string in memory and send it with UART to display in the PC, the TCD setup is to read 15 bytes from memory and place them in LPUART0 byte by byte in a single major loop. 

1 major loop -> 15 bytes. 

However, I can only see 1 character being sent. The rest is lost but the major loop does still complete.

I tested again, this time with 1 byte per minor loop and 15 bytes per major loop, and it worked.

However, in the real application (this is just a test) this would not work as it would interrupt the processor many times in succession, it is a very I/O oriented app and this would not be tolerable since it would hurt performance. How can I make the single major loop solution work? 

I attach my code below in a zip file, as well as a pic of the transfer result on the terminal, hopefully they help. 

AK.

0 Kudos
Reply
2 Replies

1,273 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi AergoXenn,

Have you check the FIFO[TXOF], does it show you Transmitter Buffer Overflow?

If you enable the 4 depth datawords LPUART TX FIFO by set FIFO[TXFE], will you see 4 datawords sent? 

Best Regards,
Robin

0 Kudos
Reply

1,266 Views
AergoXenn
Contributor II
It didn't change, still just a single character.
0 Kudos
Reply