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

Configuration of Button

On my custom board I have a button BUTTON_1 in between supply voltage (Vbatt = 3V) and input on nRF52832 - therefore input will receive 3 Volts directly.

I have configured BUTTON_1 to:

{ BUTTON_1, false, NRF_GPIO_PIN_NOPULL, button_event_handler }

However when I push it the response comes with + 10 seconds delay, sometimes more.

  • Hmm, NOPULL should work. 10 seconds delay does not makes sense for response time. That is too high delay. Why not use PULLUP just to be sure?

     

  • NOPULL is the only configuration that gives me an interrupt - though with a delay.

    What could cause the delay?

  • is the 10 seconds delay consistent for every button press? It does not make sense to have such a long delay for the interrupt handler to process the interrupt. Can you check on the logic analyzer or any scope to see if the pin toggles correctly or are there any interference from any other source?

  • Fixed the problem! Had to use PULLDOWN and swap logical pin inputs.

  • that is strange, so doing the reverse (pull up config, with active low button) does not work. But using pulldown and active high button works?? Why this would cause 10 seconds delay in response time is beyond me to understand.