Pro Micro 32U4 showing broken GPIO? - Page 1
Forum section: electronics / general

author: negativ3
author_rank: Regular Contributor
timestamp: September 16, 2025, 02:33:37 pm
content: Hey all,Running this past you as a sanity check.I want to use the hardware i2c on my pro micro (D2=SDA & D3=SCL).SCL is toggling to 5V just fine at default 100kHz.SDA is toggling but is limited to abt 820mV.4k7 pullups are in place.Testing GPIO2=SDA as a basic OUTPUT with 1kHz square wave, I get full swing 0-5V.Testing GPIO2=SDA as a basic INPUT with 4k7 resistor in place to VCC, also gives abt 820mV at the pin.No other peripherals or circuits are connected, just USB and the resistors for I2C.Can the GPIO output functionality be okay while input on the same pin is toast as observed?Many thanksAndy

author: ahsrabrifat
author_rank: Regular Contributor
timestamp: September 16, 2025, 03:14:41 pm
content: Power OFF the board. With a multimeter in resistance mode, measure R between the pin pad and VCC (across the 4.7k). It is expected to be 4.7 kΩ.If you see much lower, it means the resistor is wrong/shorted or you’re measuring to the wrong net. 4.7k is good.

author: Nominal Animal
author_rank: Super Contributor
timestamp: September 16, 2025, 03:59:27 pm
content: Quote from: negativ3 on September 16, 2025, 02:33:37 pmSomething is definitely wrong, because ATmega32u4 does not have internal pull-down resistors (datasheet PDF), only pull-ups. So, it should not be a pin configuration/programming issue.To get 0.82V at the pin with 4.7k to 5V, there needs to be something similar to a 770 Ohm resistor to ground, so that the 4.7k drops 4.18V, and the surprise 770 ohm resistor drops the rest, about 0.82V, so that measuring the pin (between the two resistors) shows that 0.82V.To drive the output to 5V, the pin only needs to source less than 6.5 mA of current (essentially shorting out the 4.7k resistor, so that the only thing left is the 770 ohms to ground), which is well within the capability of ATmega32U4.The question is, is that resistance internal or external. The pin is driven using essentially a totem pole configuration — two transistors, one to VCC and the other to GND —, and if the transistor to ground is broken due to say an overvoltage or overcurrent event on that pin, I guess it could show up like this, as always conducting to ground somewhat. So, yeah, it could be damage in the IC.Because I have somewhat bad luck (read: butterfingers, damaging stuff myself via short circuits et cetera), I usually get developer boards in pairs. That way, if one exhibits odd behaviour in circuit, I can test and compare the two boards to see whether the bug is mine or in the dev board. Usually it is mine, so do not justbelieveyour own circuit is not the problem, not even after double-checking it! You see, we humans have difficulty noticing the small differences between what we intended, and what we actually did. This is why it is so hard to proof-read your own text, and so much easier to proof-read text written by others, for example.

author: Ian.M
author_rank: Super Contributor
timestamp: September 16, 2025, 04:41:24 pm
content: Power the MCU and ground its RESET pin, and all its GPIOs*should go Hi-Z. i.e. you can pull them right up to VCC or down to GND with a 100K resistor. Also if you test (while powered) with a DMM on resistance between the pin and VCC or the pin and GND, taking care to match the probe polarity to the rails to keep the pin between them, it should read open circuit. These tests with RESET grounded eliminate all influence from the loaded firmware.I suspect Nominal Animal is correct and you will find D2 (PD1/SDA) is very leaky to GND. I also suspect that when your firmware is running, if that pin is set as output high it will be slightly below the VCC rail, more so than other unloaded GPIOs. This sort of fault (leaky to either supply rail) is typical of ESD damage, and if less severe you may not even notice till you find power consumption is excessive.* Don't expect to get a hi-Z reading from the MCU's oscillator or USB pins. Also the Pro Micro has two LEDs (with series resistors) between GPIOs and VCC. However all GPIOs that are broken out to board edge pads should be hi-Z.