IMXRT1176 LPADC2 Support

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

IMXRT1176 LPADC2 Support

1,312 次查看
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 项奖励
回复
5 回复数

1,285 次查看
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 项奖励
回复

1,282 次查看
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 项奖励
回复

1,299 次查看
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 项奖励
回复

1,290 次查看
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 项奖励
回复

1,306 次查看
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 项奖励
回复