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?
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 ?
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.
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.
解決済! 解決策の投稿を見る。