Using Internal ADC for IMXRT 1160 board for sampling - DMA method

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

Using Internal ADC for IMXRT 1160 board for sampling - DMA method

1,213 Views
HousseinKanso
Contributor I

Hello,

First, I am using the IMXRT 1160 controller. 

My target is to be able to sample an external signal continuously at a pre-defined sampling rate. (In the range of 100 kHz)

I am working on the lpadc_high_sample_rate_example supplied in the SDK examples as my starting point. In this example, DMA module is only transferring a fixed number of readings from the ADC RESFIFO to some buffer. I want this process to work in a continuous manner. I tried to modify the code by placing the DMA transfer commands (functions) in a while loop. What I am getting is the following:

DMA reads 1000 readings first, then there are 1000 null (zero) readings, then it reads another 1000 readings, and this goes forever..

Any idea about how to make the DMA do continuous transfers, so that I obtain a continuous signal sampling?

Thank you in advance,

Regards,

Houssein 

0 Kudos
Reply
1 Reply

1,208 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @HousseinKanso ,

You can use this path, PIT->ETC->LPADC->ETC->DMA. PIT generate trig signal periodically. It will send to ETC and let ETC to trig LPADC, after convert, LPADC notify the result to ETC and ETC trig DMA. You can refer to the adc_etc_hardware_triggr_con example.

 

Regards,

Jing

0 Kudos
Reply