ADC infinite loop (kinetis + k64)

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

ADC infinite loop (kinetis + k64)

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

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