ADC and ADC_HC0 Software Interrupt

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

ADC and ADC_HC0 Software Interrupt

574 Views
Kiran215
Contributor II

I am using MIMXRT1064-EVK which is having i.MXRT1064DVL6B MCU. I am using evkmimxrt1064_adc_12b1msps_sar_interrupt example provided by the SDK. In this I am trying to configure two ADC Channels of for my project, Here I can see only ADC_HC0 having software trigger, but I want to take analog readings from single ADC with different channels. Is it possible, Please help me with this.

And In example code I am unable figure out the difference between 

#define DEMO_ADC_USER_CHANNEL 0U and

#define DEMO_ADC_CHANNEL_GROUP 0U

Please give replay ASAP!

0 Kudos
Reply
3 Replies

560 Views
_Leo_
NXP TechSupport
NXP TechSupport

Hi,

Thank you so much for your interest in our products and for using our community.

For software trigger only can be used the ADC_HC0 register. For hardware trigger can be used from ADC_HC0 to ADC_HCn registers.

Hope it helps you.

Have a nice day!

551 Views
Kiran215
Contributor II

Thanks for your quick response @_Leo_ 

I have one more query, I am able to get the ADC readings properly, But after removing the sensor also the ADC showing random garbage values, Is there any function like stopping the ADC temporarily.

I have seen in the Reference Manual that in ADC_HCn, the if the first 5 bits all are 1 it will stop hardware triggering. How to achive that thing, I tried but it didn't work.

0 Kudos
Reply

523 Views
_Leo_
NXP TechSupport
NXP TechSupport

You are correct! Writing 11111 in ADCx_HCn[ADCH] disable conversion and hardware triggers will not initiate any conversion. Maybe you should check ADCH after writing to ensure its proper value.

0 Kudos
Reply