Reading ADC channels 0, 8-10 in SAMA5D3 Xplained

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

guille.rodriguez
Posts: 11
Joined: Tue Jul 14, 2015 5:18 pm

Reading ADC channels 0, 8-10 in SAMA5D3 Xplained

Wed Jul 15, 2015 2:20 pm

Hi all,

I am testing the ADC inputs on the SAMA5D3 Xplained board.

I am using the standard 3.18 kernel from Atmel (linux4sam_4.7 tag).

First I enable the channels:

Code: Select all

echo 1 >/sys/bus/iio/devices/iio\:device0/scan_elements/in_voltageX_en
Then I read the raw voltage values:

Code: Select all

# cat /sys/bus/iio/devices/iio\:device0/in_voltageX_raw
This works for all channels except A0, A8, A9, and A10, which always seem to return "random" values.

Do I need to do anything special to enable these channels in the Xplained board?

Guillermo
guille.rodriguez
Posts: 11
Joined: Tue Jul 14, 2015 5:18 pm

Re: Reading ADC channels 0, 8-10 in SAMA5D3 Xplained

Thu Jul 23, 2015 6:47 pm

I found the reason for this behaviour. By default, lines A0, A8, A9, A10 from connectors J17 and J21 in the Xplained board are NOT routed to the corresponding ADC lines in the SAMA5D36. In order to enable these it is necessary to change a few configuration resistors.

Return to “Linux”

Who is online

Users browsing this forum: No registered users and 3 guests