RT1170 Multi Channel ADC Read

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

RT1170 Multi Channel ADC Read

跳至解决方案
1,267 次查看
Bkaya
Contributor III

Hi everyone;

First of all, I start using RT1170 MCU Family for my applications and i have so many questions and problems. I read reference manual but i did not find application notes. Hence, i will try to explain and ask my questions one by one. Thanks for your help.

In my application, i aim to read ADC inputs which are:

ADC2_CH1A @ GPIO_AD_20                ADC1_CH2A @ GPIO_AD_10
ADC2_CH2A @ GPIO_AD_22                ADC1_CH4A @ GPIO_AD_14
ADC2_CH2B @ GPIO_AD_23                ADC1_CH3A @ GPIO_AD_12
ADC2_CH0A @ GPIO_AD_18                ADC1_CH5A @ GPIO_AD_16


I want to trigger both ADC1&ADC2 with one trigger and read values. On MCUXpresso, try to set configs as i mentioned but i did not understand the logic between LPADC & ETC. Therefore, here is my questions:

1)  I have four channels for ADC1 & ADC2 so i set four command number. How do auto channel increment and next command work?

Bkaya_1-1706004231418.pngBkaya_2-1706004257635.png

2) I asked myself that If i can implement trigger on adc config, why should i use ETC?. Figured that ETC can trigger both ADC1&2 at the same time. Therefore, How does conversion triggers configuration work? Should I use conversion triggers and ETC at the same time? Should I use conversion trigger as much as command configuartions and match target command number with them ?

Bkaya_3-1706004587333.png

3) I saw on reference manual that ETC 0 and ETC 4 are working in sync mode. So i set two ETC are TC0 & TC1. I want to read channels without delay so i set "BackToBack Mode". Set conversion trigger which i set before on LPADC1. How does ADC target command ID work ? I want to use SW trigger for this project but i will use HW trigger later. 

Bkaya_6-1706005521088.pngBkaya_7-1706005536480.png

In short, i want to read ADC1&2 values with one software trigger that i mentioned above but i did not make it. I shared my code below. Again thanks for help.

Best Regards. 

Basri KAYA.

 

0 项奖励
回复
1 解答
1,189 次查看
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @Bkaya ,

Thanks for your interest in NXP MIMXRT series!

For your needs, we suggest you read this post first, although it's about RT1050, it will be helpful for you to understand some concepts: ADC_ETC and conversion chain. Then, this AN might be what you are looking for.

Best regards,
Gavin

在原帖中查看解决方案

0 项奖励
回复
1 回复
1,190 次查看
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @Bkaya ,

Thanks for your interest in NXP MIMXRT series!

For your needs, we suggest you read this post first, although it's about RT1050, it will be helpful for you to understand some concepts: ADC_ETC and conversion chain. Then, this AN might be what you are looking for.

Best regards,
Gavin

0 项奖励
回复