IMXRT1176 LPADC2 Support

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

IMXRT1176 LPADC2 Support

678 Views
Ykciv
Contributor III

We used lpadc_polling example to read the data in ADC1. Its working fine.

But we need to read ADC2 channels for our project, If I change the base address of ADC1 with ADC2 its not working.

Can you please share any working example for ADC2?

0 Kudos
5 Replies

651 Views
Andy_h
Contributor II

Hello,

i have a similar problem. While using the adc_etc interrupt test, just changing the ADC base doesn't work. Do i need to do more config changes?

0 Kudos

648 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi,

DEMO_LPADC_BASE definition from LPADC1 to LPADC2, and DEMO_LPADC_USER_CHANNEL to 4. That's all what I did on the polling example. But if you test the interrupt example, you should also modify the interrupt related code.

 

Regards,

Jing

0 Kudos

665 Views
Ykciv
Contributor III

Im using 6 channels in ADC1 and 1 channel in ADC2. Shall we configure the same trigger to individually read all channels?

0 Kudos

656 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @Ykciv ,

No, ETC has 8 ext_hwts. You have enough trig channels to both of two adc.

But of course you can use one trig source to trig all 7 channel by trig chain mechanism.

 

Regards,

Jing

0 Kudos

672 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @Ykciv ,

Just change DEMO_LPADC_BASE definition from LPADC1 to LPADC2 is enough.

I tested on RT1170 EVK, define DEMO_LPADC_USER_CHANNEL to 4 (because LPADC2 CH0 doesn't pin out on the board). It works fine.

 

Regards,

Jing

0 Kudos