MKV5x HSADC sample code

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

MKV5x HSADC sample code

1,119 次查看
shelbyzhu
Contributor II
We are evaluating TWR-KV58F220M development board so we can upgrade from KV46xx MCU to KV5x MCU.
We installed Xpresso development environment and SDK2.2 for MKV5x (SDK_2.2_TWR-KV58F220M).
We tested a few demo apps and they worked properly. But when we tried HSADC sample from driver_examples folder. The ADC readings did not reflect the input at corresponding ADC input pins.
We tried two boards ordered from different sources and they behave the same. None of them worked. What we saw are constant values (with minor variations) from each channels, eg:
Sample 0        Sample 1        Sample 8        Sample 9
17688           21632           8928            0
16384           21576           208             0
16384           19976           208             8
16384           18592           264             8
16384           18440           240             0
16392           18480           232             0
16392           21608           232             0
16384           20184           208             0
16392           19088           248             8
16384           21624           200             8
16392           19600           200             0
The test input voltage was provided using either GND or 1.5v, with 20k ohm series resistor to the input.
Could anyone help us find out there is anything extra we need to do to get it to work? Or you have updated sample code for us to try?
Regards,
Shelby
0 项奖励
回复
3 回复数

916 次查看
shelbyzhu
Contributor II

When revisiting this, I found that I had connection problems. After the correction, everything worked as expected.

Thanks Xiangjun for the help!

Shelby

0 项奖励
回复

916 次查看
shelbyzhu
Contributor II

Hi Xiangjun,

Thanks for helping me on this issue!

I tried connect GND directly to ADC input pin and it did not help. They still show what it would normally show, as if the signal is not connected.

Thanks,

Shelby

0 项奖励
回复

916 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Shelby,

I think the 20K ohm serial resistor is too large, if you connect the GND or 1.5V to ananlog pin directly, what is the result?

BR

Xiangjun Rong

0 项奖励
回复