ADC "input scan" - adjacent pins only?

Discussions around product based on ARM Cortex M0+ core.

Moderator: nferre

riz-calliope
Posts: 2
Joined: Fri Mar 18, 2016 6:38 pm

ADC "input scan" - adjacent pins only?

Tue Nov 08, 2016 8:42 pm

Our product is based around the ATSAMW25, which has a SAMD21G core, and we've been successfully using PA04 configured as AIN[4] to read the voltage of our battery. Now we're realizing we'd like to be checking the internal temperature sensor (ADC_POSITIVE_INPUT_TEMP) as well. Looking at the documentation for the input scan mode for the ADC, it seems like we can only scan multiple _adjacent_ inputs; According to the datasheet, for MUXPOS, AIN[4] is 0x04 and TEMP is 0x18, so it seems like I can't use the input scan (at least not easily).

Is my best bet here to completely reconfigure the ADC every time I want to read from our battery vs. the internal temp sensor? Am I missing something obvious? We're mostly using ASF, though I'm in the process of slowly moving off ASF to direct register-twiddling for some stuff for code space and speed reasons.

A whack with the cluebat would be appreciated!

+j

Return to “SAM D20 Cortex-M0+ MCU”

Who is online

Users browsing this forum: No registered users and 1 guest