Part Number:AM4378
Processor: AM4378
Kernel: 4.1.6
Background:
When I use generic_buffer tool to sample the data from a pwm
channel(50%duty), I find data are not in uniform distribution,
even it has big difference between high level and low level
voltage. I know it is impossible to make the data in uniform
distribution, but the big difference makes me in bad situation.
Params:
1. generic_buffer: lenght=20, 5ms sample once.
2. Below "ADC value" is raw data from "read"
3. "ADC AVG" is the highest (array[16]+array[17]+array[18])/3
Devicetree:
this channel is configured as "adc" instead of "tsc"
opendelay=0x00
sampledelay=0xff
I only use channel6, and in dts, i open channel 5/6/7 three
channels.
Thanks for any suggestion.
iio device number being used is 0
scan_size:2
read_size:40
ADC value:1821 1820 1819 1820 1820 864 8 0 0 0 0 1823 0 0 0 1835
1816 1818 1825 1817
ADC AVG Value: 1823
read_size:40
ADC value:1817 24 0 2 0 0 1841 1818 1820 1818 1818 1820 0 0 0 0
1823 1819 1819 1818
ADC AVG Value: 1821
read_size:40
ADC value:1818 1821 0 0 0 0 0 1824 1830 1819 1820 1818 1820 1817
1819 1821 1816 97 5 0
ADC AVG Value: 1822
read_size:40
ADC value:10 0 1855 1824 1820 1817 1822 1820 233 0 0 0 1819 2 0 0
0 0 1830 1820
ADC AVG Value: 1825
read_size:40
ADC value:1817 1832 1817 1819 6 0 0 0 0 1844 1821 1820 0 0 1821
1820 1818 1822 1819 619
ADC AVG Value: 1825
read_size:40
ADC value:0 0 0 0 0 1823 1820 1818 1818 1824 1822 0 1819 1818
1816 16 0 2 0 0
ADC AVG Value: 1821
read_size:40
ADC value:1838 1819 1818 1827 1821 1818 47 0 0 8 0 1846 0 4 0 0
1824 1819 1819 1820
ADC AVG Value: 1829
read_size:40
ADC value:1818 1817 7 0 1 0 0 1825 1821 1818 1818 1821 1820 1818
1820 29 0 0 0 0
ADC AVG Value: 1820
read_size:40
ADC value:1839 1821 1820 1821 1831 1820 45 0 0 0 0 1841 0 0 0 0
1824 1820 1828 1819
ADC AVG Value: 1832
read_size:40
ADC value:1822 1818 3 0 0 4 0 1825 1820 1818 1818 1820 1821 1836
1820 1819 1819 103 0 6
ADC AVG Value: 1822