Can Pullups be enabled on Analog Input pins?

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would think that pull-ups / pulldown resistors are disabled (SAMV71, ASF4) when an Analog function is selected for an ADC pin. However, I can’t find anything in the data sheet that says that. And I want them off.

 

I have an analog input pin with a voltage divider (100k, 100k) on the input so with a 3.3Volt input I would expect to see 1.65 volts coming to the ADC.  I read 2.14 Volts. A Voltmeter confirms that there is 2.14V on the divider. There resistors appear to be correct.

 

The HW engineer believes that there is an internal pullup on the ADC internally causing the voltage change. I would think that pull-ups are disabled when Analog mode is selected.  But I can’t find confirmation in the V71 datasheet. 

 

Atmel Start does not have any way to select a pullup on an analog pin. I can’t find any call the PIO_PUER (Pulldown Enable Register) for that pin in the generated startup code.  Using my IAR debugger, the PIO_PUSR (Pullup Status Register) is a ‘1’ for that bit, which would indicate pullup is disabled, unless this bit is invalid when in Analog mode.

 

Can anyone confirm that pull-ups/pulldowns are disabled in Analog mode?

Last Edited: Thu. Sep 10, 2020 - 01:12 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I can't find the registers you refer to in the datasheet. I found this indicating that the status bits are active low:

Reading a one in PIO_PUSR means the pullup is disabled and reading a zero means the pullup is enabled.

Reading a one in PIO_PPDSR means the pullup is disabled and reading a zero means the pulldown is enabled.

/Lars 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This kind of hints that you must turn off the digital functions:

The analog inputs AFE_ADx are multiplexed with digital functions on the I/O lines. AFE_ADx inputs are selected as inputs of the AFEC when writing a one in the corresponding CHx bit of AFEC_CHER and the digital functions are not selected.

/Lars 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have never found a way to enable pullups on an ARM Analog pin.  e.g. Zero, Due, STM32,  NXP, ...

 

You can enable pullups on an ADC pin with an AVR.

 

Yes,  it corrupts the ADC functionality.

 

If you discover how to do it on a SAM71 please let us know.    Perhaps I could use your technique with SAMD21, SAM3XE, ...

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well it's clearly documented not possible for some, this is from the D5x/E5x datasheet:

Analog functions are connected directly between the analog blocks and the I/O pads using analog buses. However, selecting an analog peripheral function for a given pin will disable the corresponding digital features of the pad.

/Lars 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Lars,

 

Thanks for your replies. I had mistyped a register name. I have fixed that in the original post.

 

 

Last Edited: Thu. Sep 10, 2020 - 01:14 PM