Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
attachInterrupt() current consumption #153
When the MCU goes into sleep mode after attachInterrupt() it consumes 1mA. This is too much for a battery powered application.
I prefer to switch from Config Channels to Pin Sense. This allows sleeping with uA current. Pin Sense is not so flexible like Config Channels. This requires a logic to find out what pin was changed. Falling and Rising detection is easily possible. Pin change needs some logic.
Switching to Pin Sense allows monitoring of more Pins than Config Channels.
If it not possible to switch to pin sense, I need handling of NRF_GPIOTE->EVENTS_PORT, so I can implement my own routine.
When it is acceptable to switch to Pin Sense, I create a Pull Request.
Btw. I think the actual implementation will fail when multiple pins are inserted and removed in different order.
@sandeepmistry I use the
When GPIOTE channels are disabled, I measure a sleeping current around 3uA. When enabled the current is around 950uA. -> https://devzone.nordicsemi.com/question/2471/gpio-wakeup-low-power-workarounds/
Hello @sandeepmistry it seems the high current consumption is a nRF51 specific problem documented as PAN #39. It's marked as fixed in PAN v 3.0 and later: http://infocenter.nordicsemi.com/pdf/nRF51822-pan_v3.0.pdf