Why eDMA not work? RT1170EVK (LPADC to memory)

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

Why eDMA not work? RT1170EVK (LPADC to memory)

ソリューションへジャンプ
1,964件の閲覧回数
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 解決策
1,903件の閲覧回数
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 返答(返信)
1,919件の閲覧回数
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 件の賞賛
返信
1,904件の閲覧回数
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 件の賞賛
返信
809件の閲覧回数
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 件の賞賛
返信
797件の閲覧回数
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 件の賞賛
返信
1,898件の閲覧回数
Hui_Ma
NXP TechSupport
NXP TechSupport

Thank you for the updated info.

Mike

0 件の賞賛
返信