2398263_en-US

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

2398263_en-US

2398263_en-US

Uart using DMA is not working correct on S32K314

Hello, 

We are currently trying to configure LPUART0 channel to work with DMA. The uart channel need to be working at a bitrate of 1Mbps.

Our current configuration for UART and DMA looks like this. 

CosminSbera_0-1784803400829.png

CosminSbera_1-1784803453733.pngCosminSbera_2-1784803479911.pngCosminSbera_3-1784803495720.png

CosminSbera_4-1784803522819.pngCosminSbera_5-1784803539872.png

The clock is enable in MCU, the buffers are declared inside a non cacheable area , the DMA ISR priority is smaller than the LPUART.

Our problem is that we are not able to see the data inside the RX buffer or is incomplete. 

Our workflow is like this (similar to LIN communication
prepare rx buffer -> AsyncReceive
send the header to the slave -> AsyncSend
wait until the data from the slave is received in the next cycle (my function runs in a 1ms task)

If I put a break point after AsyncSend is executed I can see all the data send from slave inside the RX buffer.
If I let it run there is nothing there or is incomplete.
My assumption is that the DMA interrupt comes later. 

Could you give us some hints on what is wrong inside our configuration or what I could check next?

Thank you!

Cosmin


Re: Uart using DMA is not working correct on S32K314

Hi@CosminSbera

1.Don't forget to enable DMA Request Option.

Senlent_0-1784861937675.png


2.Don't forget to enable the LPUART0_IRQn interrupt in the "Platform" component.

"Platform"->"LPUART0_IRQn --LPUART_UART_IP_0_IRQHandler“




Tags (1)
No ratings
Version history
Last update:
20 hours ago
Updated by: