ATUC256L4U: GPIO erroneously detecting

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

Hello.

 

I have a 1k resistor wired directly between PA18 and Ground on some newer PCBs. I am using it as hardware detection of the PCB version in the following way:

 

#define REVISION_DETECT_PIN       AVR32_PIN_PA18

pio_enable_gpio_pin(REVISION_DETECT_PIN);
gpio_enable_pin_pull_up(REVISION_DETECT_PIN);

if (gpio_pin_is_low(REVISION_DETECT_PIN)) {
	p4_pcb_rev = PCB_REV2;
}

In the older versions there is nothing connected to PA18 yet it still claims to detect something and spits out PCB_REV2.

 

Does anyone see some obvious mistake here? 

1010001010111101110111

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

The pullup-resistance on that processor family is 75k (min), 100k (typical), 145k (max).

Excessive stray leakage to ground ?
Long wire-trace to that hardware-detection resistor that is picking-up some RFI ?