s32k324 uart using DMA not able to send the data

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

s32k324 uart using DMA not able to send the data

跳至解决方案
802 次查看
Prasad_330
Contributor III

I am working  on s32k324 controller. I wanted to use the uart using the DMA.I am trying to send 10 bytes of data, but I am able to send only one byte of data. 

when i am using the function

"Lpuart_Uart_Ip_GetTransmitStatus(3,&remainingBytes)"

the return value is "LPUART_UART_IP_STATUS_BUSY" and remainingBytes bytes is reduced by one (9).

i am able to transmit one byte of data only when i change the  Second parameter in the below function

Dma_Ip_SetLogicChannelCommand(UartUserCfg->TxDMAChannel, DMA_IP_CH_SET_HARDWARE_REQUEST);

the above function is auto generated.

In the below function second parameter is changed for which i am able to transmit one byte.

Dma_Ip_SetLogicChannelCommand(UartUserCfg->TxDMAChannel, DMA_IP_CH_SET_SOFTWARE_REQUEST);

 

I have also attached the code below. I want some support, plz help me out,

thanks in advance

 

0 项奖励
回复
1 解答
680 次查看
Prasad_330
Contributor III

hi Petr,

It's working

Thanks for the support

在原帖中查看解决方案

0 项奖励
回复
5 回复数
681 次查看
Prasad_330
Contributor III

hi Petr,

It's working

Thanks for the support

0 项奖励
回复
683 次查看
Prasad_330
Contributor III

hi petr

It is working. thank you

 

0 项奖励
回复
741 次查看
Prasad_330
Contributor III

Hi Petr,

Thanks for the support. I am able to transmit and receive the data using DMA

0 项奖励
回复
752 次查看
Prasad_330
Contributor III

Thanks PetrS,

I had take the your project as the reference.

But i am not able to transmit any data.

i am trying to send the data using "lpuartStatus = Lpuart_Uart_Ip_AsyncSend(3, (uint8_t*)arrys, 5);"

The return value is always "LPUART_UART_IP_STATUS_SUCCESS".

I am getting event  as "LPUART_UART_IP_EVENT_TX_EMPTY"  for event call back function mentioned below.

UART_event_cbk(const uint8 HwInstance, const Lpuart_Uart_Ip_EventType Event, void *UserData);

can you Please guide me

 

0 项奖励
回复
773 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

seems below thread gives very basic LPUART DMA example using RTD:
https://community.nxp.com/t5/S32K/S32K3-LPUART-using-DMA-in-RTD-3-0-0/m-p/1737356

BR, Petr