Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

GPIOTE Button interrupt not triggering

I can't get a button to work on a custom board; but same firmware HEX file on a different board works fine.

Using nRF5 SDK 17.0.2, SoftDevice S132 v7.2.0.

using a custom_board.h with

#define BUTTONS_NUMBER 2
#define BUTTON_START 22
#define BUTTON_1 22
#define BUTTON_2 23
#define BUTTON_STOP 23
#define BUTTON_PULL NRF_GPIO_PIN_PULLUP

#define BUTTONS_ACTIVE_STATE 0

#define BUTTONS_LIST { BUTTON_1, BUTTON_2 }

#define BSP_BUTTON_0 BUTTON_1
#define BSP_BUTTON_1 BUTTON_2

Polling button state using bsp_button_is_pressed(BTN_0) works
But I'm not receiving any BSP_EVENT_xx events, the gpiote_event_handler in app_button never gets called

- PIN_CNF value is 0x0003000C after init, which seems fine.
- I'm enabling clocks using nrf_drv_clock_init() and nrf_drv_clock_lfclk_request(NULL)
- Tried lowering GPIOTE_CONFIG_IRQ_PRIORITY down to 2, to no avail
- Tried PULLUP, PULLDOWN, and NOPULL, tried shorting pin level directly to ground.
- Tried both using the bsp button functionality, and using app_button directly.

Seems similar to earlier issues:
devzone.nordicsemi.com/.../gpio-button-interrupt-is-not-triggering
devzone.nordicsemi.com/.../gpiote-interrupt-doesn-t-catch-button-press

Except that it does work on a different board.

Any clues as to what else I should look at ?

Best regards,

Ivo.

Related