This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

GPIOTE consuming high current after first press of a button

I used the example pin_change_int from peripheral examples and commented the OUT pins. In addition I added the sleep commands to the main while loop. This is the code:

When I power profile it right after turning the device on, I get a nice expected current consumption of 32uA as seen below

However, as soon as I press the button per code, the consumption goes high and stays high. I was expecting it to spike up but then go back to normal. Why is this occurring? I am using the DK board and using the regular board button 0 for this. Why is it using so much current consistently?

  • could it be that

     in_config.pull = NRF_GPIO_PIN_PULLUP;

    on the code is not working? therefore the pin is floating?
  • I dug a bit further and found ran the debugger. Found out that the in_pin_handler is being called twice on every key press. I wonder if this is causing high consumption. Why would the code above call in_pin_handler twice on the same button press?

  • Hi.

    Could you tell me which DK you are working with, so that I can test this myself?

    Also; are you seeing the high current consumption on a single button press (press and release) or are you holding the button down?

    Best regards,
    Joakim Jakobsen

  • Single fast button press and release. DK: PCA10056 1.1.0 2019.19 683309915  nrf52840

  • btw, I tested 2 different DKs with the same results. At one rare point, it actually temporarily spiked up the current when I pressed the button and went back to the original state. But that only happened like twice. The rest of the time, no matter how many times I restarted the DK it would spike up on the first button press. And then stays at 200+uA from there

1 2 3