S32K3 LPUART using DMA in RTD 3.0.0

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

S32K3 LPUART using DMA in RTD 3.0.0

Jump to solution
6,023 Views
nhyjq2000
Contributor I

Hello,

I have implemented interrupt based LPUART sample succesfully. Then I refered to https://community.nxp.com/t5/S32K/S32K3-Lpuart-using-DMA/m-p/1717935#M26818 and https://community.nxp.com/t5/S32K/S32K344-UART-DMA-example/m-p/1583510 to try DMA based LPUART, but I can't send and receive any data. 

And I noticed there are some differences between samples and mine. because in my S32DS enviroment, no DMAMUX source setting in DMA_ip->Specific Configuration->Dma logic channel.

My RTD version is 3.0.0 P07, S32DS version is 3.5 Update 6.

May I know how to solve it, Thank you.

0 Kudos
Reply
1 Solution
5,935 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

I tried your first project and after few modification it seems to be running.
It sends welcome message then waits for 10bytes and echoes them back finally.

BR, Petr

View solution in original post

0 Kudos
Reply
7 Replies
5,995 Views
PetrS
NXP TechSupport
NXP TechSupport
0 Kudos
Reply
5,975 Views
nhyjq2000
Contributor I

I've tried to append Rm module and configured, following is related snapshot, but it dosen't work yet.

1.jpg2.jpg3.jpg4.jpg

BTW: Must I mix MCAL Rm driver and IP driver for my program?  I just plan to use IP driver to implement LPART based DMA, could you have other solution or some sample code?

Best regards.

 

0 Kudos
Reply
5,954 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

check if DMAMUX is really configured. You should call Rm_Init with some parameter generated.
Rm_Init(&Rm_Config);

BR, Petr

0 Kudos
Reply
5,946 Views
nhyjq2000
Contributor I

Hello Petr,

I confirmed DMAMUX configured and modified Rm_Init, from Rm_Init(NULL_PTR) to Rm_Init(Rm_Init(&Rm_Config_BOARD_INITPERIPHERALS), but it dosen't work well.

1.jpg

From Line 82 to 92, I can see output in my Serial Tool,  but lpuartStatus is still  LPUART_UART_IP_STATUS_BUSY continuously.

Attachment is the latest code, could you help me to check what't wrong?  Thank you.

Best regards.

0 Kudos
Reply
5,936 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

I tried your first project and after few modification it seems to be running.
It sends welcome message then waits for 10bytes and echoes them back finally.

BR, Petr

0 Kudos
Reply
2,119 Views
iverson3ya
Contributor III
@PetrS
I have already referred to this example, but I am still stuck at 'UART_STATUS_OPERATION_ONGOING' when sending data. My external UART device has already received the data, and I need to manually trigger a timeout to proceed with the next transmission.

When testing data reception, it also shows 'UART_STATUS_DMA_ERROR'. Could you please help identify the issue? I have already configured the interrupt.

thanks
0 Kudos
Reply
5,924 Views
nhyjq2000
Contributor I
Hello Petr,
It works well in my computer. Thank you very much.
Best regards.
0 Kudos
Reply