Hi
目前我們在使用adc 功能 只能讀到4095 請問除了 下圖這部分 還有其他地方需要作設定嗎?
電壓值超過1.8v會全部判讀為4095嗎?
Thanks
Daniel
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
dts 增加
&tscadc {
status = "okay";
adc {
ti,adc-channels = <0 1 2>;
};
};
並開啟 Linux Kernel IIO driver
ADC 還是只能讀到 4095
~ # iio_generic_buffer -N 0 -g -a
iio device number being used is 0
trigger-less mode selected
Enabling all channels
Enabling: in_voltage1_en
Enabling: in_voltage0_en
Enabling: in_voltage2_en
4095.000000 4095.000000 4095.000000
4095.000000 4095.000000 4095.000000
...
4095.000000 4095.000000 4095.000000
Disabling: in_voltage1_en
Disabling: in_voltage0_en
Disabling: in_voltage2_en
~ #
(參考資料 http://software-dl.ti.com/processor-sdk-linux/esd/docs/latest/linux/Foundational_Components/Kernel/Kernel_Drivers/ADC.html)
HW 提供了空接與分壓兩種版本,情形相同。
請問除了 < 1.8V Vref 外,還有什麼應注意事項?