Internal Pull-up and Pull-downs for battery MCU & interrupt

Hello,
I have a magnetic reed switch waking my microcontroller (nRF51822 BLE module in this case). I'm using a reed switch to see if a lid is closed. The MCU is asleep most of the time except when the box is opened or closed (rise/fall interrupt).

The interrupt pin only wakes the MCU if I touch it to ground or remove the pin from ground. If I touch the interrupt pin to 3.3V, nothing happens. Does that mean the interrupt pin is internally pulled UP? That it has an internal pull-up resistor?

I've also noticed that in sleep, if the interrupt pin is not touching ground, the MCU consumes really low 3uA. When the interrupt pin is grounded, current consumption goes up to 230uA. Is that because Vdd is going through to weak internal (pull up?) resistor into ground? Is there anyway to fixed this current consumption?

How do people use pin interrupts in battery applications where the pin could potentially spend a lot of time in either state?

Yeah, that sounds like there's a weak internal pullup on the pin; it is typical to design the system so that during normal operation the pin will not be connected to ground except for short periods of time (for example, while the user is pressing a button).

Always check the datasheet. That microcontroller has user-configurable pull-ups and pull-downs.

Did you configure them?

The behavior of a High-Z input pin is erratic if it is ever left floating. Your test of just connecting the pin and observing the behavior of the microcontroller as it interprets the state will always be inconclusive.

If you want to know if there are pulling resistors on a pin, connect it to GND and VCC with an ammeter and see if you can measure current flowing through the pin when it's connected to one of them.

DrAzzy:
Yeah, that sounds like there's a weak internal pullup on the pin; it is typical to design the system so that during normal operation the pin will not be connected to ground except for short periods of time (for example, while the user is pressing a button).

If it's not just a button - if I'm sensing the position of a lid with a reed switch, the lid can spend inordinate amounts of time in either position, so I don't think can design that out.

Maybe I can increase the resistance to lower the current? If I put an external resistor in series with the reed switch to ground, that would essentially add to the resistance of the internal pull-up. But if the external resistor is too high, I won't get a reliable reading in the input pin. Going by 3.1V and 200uA, I think the internal pull-up is 15kOhm? Even if I add a conservative 5kOhm external resistor to ground, I can really only expect to lower the current consumption on a grounded interrupt pin to 155uA. That seems like a lot for a coin cell.

If it's just a single throw switch, you've got limited options. The best one will probably be to disable the pullup when the pin goes low, and briefly re-enable it at regular, relatively slow intervals (like every 50 ms) to check if the pin is still low. Once you read a HIGH, you can leave it on until the pin goes low again.

If you are able to get ahold of a double throw changeover switch, there's another option, but I don't know how easy a DT reed relay would be to get.