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

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

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

1,097 Views
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
Labels (1)
3 Replies

997 Views
lpcware
NXP Employee
NXP Employee
bump
0 Kudos

997 Views
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.

997 Views
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.