ADC infinite loop (kinetis + k64)

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

ADC infinite loop (kinetis + k64)

626 Views
vivien_leymarie
Contributor I

Good morning everybody,

I tried to use an ADC to get data from pins (they are either at 0 (ground) or 3.3v).

I have used this helpful tutorial : Tutorial: ADC with the Freedom Board | MCU on Eclipse  yet with a break point it get to AD1_GetValue16(&value); but then goes into an infinite loop and value is never updated. 

To get started, i am just trying with only one pin, currently my test pin ADC0_DP1 is grounded.

I will join my ADC settings and code to show you what i have done.

Thank you for your support :smileyhappy:

0 Kudos
Reply
1 Reply

566 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi vivien,

I try to follow that Tutorial using KDS3.2 test on FRDM-K64F board.

Tutorial.png
In the Variables View, I can see how the value changes:

AD1_GetValue16.png

Would you please let me know the problem that you meet?

If the value is always 0 or 3.3v, then you may need to check the voltage of VREFSH and VDDA.

Table 35-1. ADC signal descriptions.png

Best Regards,

Robin

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply