Why eDMA not work? RT1170EVK (LPADC to memory)

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

Why eDMA not work? RT1170EVK (LPADC to memory)

跳至解决方案
2,288 次查看
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 项奖励
回复
1 解答
2,227 次查看
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 项奖励
回复
5 回复数
2,243 次查看
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 项奖励
回复
2,228 次查看
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 项奖励
回复
1,133 次查看
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 项奖励
回复
1,121 次查看
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 项奖励
回复
2,222 次查看
Hui_Ma
NXP TechSupport
NXP TechSupport

Thank you for the updated info.

Mike

0 项奖励
回复