2054475_en-US

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

2054475_en-US

2054475_en-US

S32K314 UART DMA transfer, how to call Lpuart_1_Uart_Ip_DmaTxCompleteCallback();

with S32K314, I am debugging Uart_AsyncSend on PIN140/PTC7/LPUART1_TX.

I plan to use DMA mode, the MCAL is generated with tresos studio 28.2

I can captuer the UART output data with oscilloscope, and the data is right what I send out.

But unfortunately, only one time transfer is OK. 

After one time transfer, UartState/IsTxBusy is always '1'.

BytesRemaining is always the data length of what I sent and won't decrease, although the data already appeared on oscilloscope screen.
I think it is caused by Lpuart_1_Uart_Ip_DmaTxCompleteCallback().
After one major DMA loop, Lpuart_1_Uart_Ip_DmaTxCompleteCallback() will be triggered by interrupt. Is it right?
With PE debugger, I can not get the breakpoint in  Lpuart_1_Uart_Ip_DmaTxCompleteCallback().
So I think there must be any errors to trigger Lpuart_1_Uart_Ip_DmaTxCompleteCallback().
could you tell me how to trigger Lpuart_1_Uart_Ip_DmaTxCompleteCallback() after UART DMA transfer completed? 
Thanks

IsTxBusy.jpgcallback.jpgEB_CFG.jpg

 

Re: S32K314 UART DMA transfer, how to call Lpuart_1_Uart_Ip_DmaTxCompleteCallback();

Hello @gufengzi,

The RM driver is the Resource driver in your RTD 2.0.3 configurator.

Anyway, the NVIC ISER registers are configured in Platform_Init().

Do you call the function?


Thank you,

BR, Daniel


Re: S32K314 UART DMA transfer, how to call Lpuart_1_Uart_Ip_DmaTxCompleteCallback();

hello Daniel,

I can not find DMAMUX and RM in my EB project.

Sorry the whole project can not be shared. how to create a support ticket?

Additionally, after I set 0xE000E100 to "1",  it works well. 

I think the reason is that I did not set the corresponding NVIC_ISER correctly.

Could you tell me how to set NVIC_ISER bit in EB project?

ThanksE000E100.jpg

EB.jpgMCL.jpg

Re: S32K314 UART DMA transfer, how to call Lpuart_1_Uart_Ip_DmaTxCompleteCallback();

Thank you, that looks correct.

What about the DMAMUX configuration in the RM configurator, can you share it?

Or can you share the whole project so that I can check it and test it on my side?

If you don't want to share it here, consider creating a support ticket.


Regards,

Daniel

Re: S32K314 UART DMA transfer, how to call Lpuart_1_Uart_Ip_DmaTxCompleteCallback();

do you think the handler is Dma0_Ch0_IRQHander?

I already configured it.

dma_handler.jpg

Re: S32K314 UART DMA transfer, how to call Lpuart_1_Uart_Ip_DmaTxCompleteCallback();

Hello @gufengzi,

I don't see the handler funtions in the screenshot you posted.


An example is attached to the case, it is for S32DS, but the configurator is very similar.


Regards,

Daniel

Re: S32K314 UART DMA transfer, how to call Lpuart_1_Uart_Ip_DmaTxCompleteCallback();

I already checked DMATCD0_IRQn.

interrupt_enabled.jpg

Re: S32K314 UART DMA transfer, how to call Lpuart_1_Uart_Ip_DmaTxCompleteCallback();

Hello @gufengzi,

Did you enable the DMA interrupts in the PLATFORM configurator?


Thank you

Tags (1)
No ratings
Version history
Last update:
‎11-21-2025 10:56 PM
Updated by: