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

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

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

1,253件の閲覧回数
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 件の賞賛
返信
1 返信

1,248件の閲覧回数
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 件の賞賛
返信