LPCOpen 2.16v + LPC4337 + ADC + DMA triggered by peripheral

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

LPCOpen 2.16v + LPC4337 + ADC + DMA triggered by peripheral

1,128 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rob.konieczny on Fri Apr 01 16:13:06 MST 2016
Hi,
Can someone give some example how to configure ADC and DMA in the way that DMA transfer is triggered by peripheral (GPDMA_TRANSFERTYPE_P2M_CONTROLLER_PERIPHERAL)?
I've tried on many ways but all the time with the same result - DMA triggered once, operates without waiting for next trigger from ADC. Like it would be GPDMA_TRANSFERTYPE_P2M_CONTROLLER_DMA.
Similar problem described here DMA ADC sync.

Thanks and regards,
Robert
标签 (1)
3 回复数

1,028 次查看
lpcware
NXP Employee
NXP Employee
bump
0 项奖励

1,028 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rob.konieczny on Sat Apr 16 00:07:37 MST 2016
Thanks for suggestion but unfortunately it's not the case. I've configured DMA to use buffer which is 128 element long, not like in default LPCWare examples.
DMA runs through whole buffer after being triggered only once by ADC.

1,028 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by thedaz on Sat Apr 09 02:59:31 MST 2016
The reason is that one DMA transaction is executed only once then disables the DMA. The example defines a transfer size of one word. In order to have the DMA transfer another ADC sample you'll need to setup another transaction after the first completed.