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

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

ソリューションへジャンプ
814件の閲覧回数
gufengzi
Contributor III

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

 

 

0 件の賞賛
返信
1 解決策
708件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

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

 

元の投稿で解決策を見る

0 件の賞賛
返信
7 返答(返信)
801件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @gufengzi,

Did you enable the DMA interrupts in the PLATFORM configurator?

 

Thank you

0 件の賞賛
返信
798件の閲覧回数
gufengzi
Contributor III

I already checked DMATCD0_IRQn.

interrupt_enabled.jpg

0 件の賞賛
返信
779件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

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

0 件の賞賛
返信
771件の閲覧回数
gufengzi
Contributor III

do you think the handler is Dma0_Ch0_IRQHander?

I already configured it.

dma_handler.jpg

0 件の賞賛
返信
752件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

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

0 件の賞賛
返信
740件の閲覧回数
gufengzi
Contributor III

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

0 件の賞賛
返信
709件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

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

 

0 件の賞賛
返信