Why eDMA not work? RT1170EVK (LPADC to memory)

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

Why eDMA not work? RT1170EVK (LPADC to memory)

Jump to solution
2,062 Views
auftrag2021
Contributor III

HW: RT1170EVK

Target: move the RESFIFO from LPADC1 to dstAddr

Configuration in eDMA:

auftrag2021_0-1649234448006.png

Configuration in LPADC1

auftrag2021_2-1649234559129.png

start LPADC1 per SW in Main()

LPADC_DoSoftwareTrigger(LPADC1, 1U);

The problem is, the callback from eDMA function was never called in my application. Why? 

So far as I understand, I trigger the LPADC1 per SW, after the watermark is running out, the LPADC1 trigger the DMA request, then the DMA get the result from LPADC1->RESFIFO, because I set the Minor and Major both as 4-Bytes, the eDMA should activate the callback after 4-Byte is transfered, right? where do I do wrong?

p.s. I extra tested the eDMA alone with SW trigger (EDMA_StartTransfer(&DMA0_CH0_Handle);), the callback function worked pretty well. The eDMA itself has no problem.

 

 

 

 

0 Kudos
Reply
1 Solution
2,001 Views
auftrag2021
Contributor III

thanks for your attention.

the issue was solved, but not in your way. the DMAMUX was correctly configured. 

The problem was, I did set the watermark as 1, when I change the value to 0. It's fine to trigger the callback function from eDMA

View solution in original post

0 Kudos
Reply
5 Replies
2,017 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

Sorry for the later reply.

Besides of initialize LPCADC1 and eDMA module, it also needs to config the DMAMUX.

Please refer below code just an example for your reference:

Hui_Ma_0-1650614699449.png

Wish it helps.

Mike

0 Kudos
Reply
2,002 Views
auftrag2021
Contributor III

thanks for your attention.

the issue was solved, but not in your way. the DMAMUX was correctly configured. 

The problem was, I did set the watermark as 1, when I change the value to 0. It's fine to trigger the callback function from eDMA

0 Kudos
Reply
907 Views
akhil__
Contributor II

Hi,

Could you please share this file for reference? I'm facing some issues while configuring LPADC using DMA. Having access to the file would greatly assist me in understanding the correct configuration procedure and resolving the difficulties I'm encountering. Any additional guidance or insights you can provide on LPADC configuration with DMA would be greatly appreciated. Thank you for your assistance."

0 Kudos
Reply
895 Views
auftrag2021
Contributor III

I am not using RT1176 for a long while

here is sth. I found a few years ago about the eDMA config tools problem

https://community.nxp.com/t5/MCUXpresso-Config-Tools/eMDA-config-tools/m-p/1432103#M1363

due to NXP staff reply, there are some bug in the MCUxpressor for the eDMA config tools

 

if you want your eDMA work properly, strictly follow the user manual instruction,  don't blindly trust the config tools

 

0 Kudos
Reply
1,996 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Thank you for the updated info.

Mike

0 Kudos
Reply