LPC55xx ADC and DMA FIFO wartermark trigger

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

LPC55xx ADC and DMA FIFO wartermark trigger

Jump to solution
1,899 Views
johanleroy
Contributor I

Hi,

 

I am trying to get the DMA trigger working with the ADC.

The example application does a software trigger to start the DMA transfer. This doesn't have any advantage at all compared to copy the values manually to an array. What I would like to do is automatically start the DMA transfer after the FIFO watermark is reached. 

I tried enabling the REQ_ENA21 (ADC0 FIFO 0) in the INPUTMUX register but that doesn't seem to work.

Any help would be greatly appreciated.

 

Kind regards

 

Johan

0 Kudos
Reply
1 Solution
1,891 Views
Alice_Yang
NXP TechSupport
NXP TechSupport
0 Kudos
Reply
2 Replies
1,870 Views
gertvb
Contributor III

Hallo Johan and Alice!

Please Just be careful with the code that I posted last year!

I've picked up that the ADC and DMA seems to lose sync somehow, and that what I think is ADC[0] value ends up randomly in buffer[n] value instead of in buffer[0]

I've been up and down in the code and in the configuration the last month, since I picked up the problem, and have more or less changed every parameter in the configtools setup, but to no avail.....

I am now flushing the fifo buffer on every 100th dma callback to try and fix the issue

Also note that my original ADC clock speed of 6MHz was also incorrect and that I changed it to 24MHz

Groete

Gert van Biljon

A TechExplorer working with Embedded Software and Electronics in Agriculture and Alternative Energy
0 Kudos
Reply
1,892 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Johan,

 

You can have a look at this thread:

https://community.nxp.com/t5/LPC-Microcontrollers/Using-Configtools-to-set-up-ADC-and-DMA-from-scrat...  

 

BR

Alice

0 Kudos
Reply