GPIO interrupt doesn't work under NRF54L15

Hi,

I need to use the GPIOTE with interrupt function with nrfx (https://github.com/NordicSemiconductor/nrfx/) directly on the nrf54l15 DK board.

So I created a build system based on Makefile and ARM-GCC, the core Makefile (smtc-hal-mcu-nrf54l15.mk) is also attached.

I created a simple example as attached code shows. This code loosely based on NCS v2.9.1/zephyr/samples/boards/nordic/nrfx/src/main.c.

However, that sample uses PPI to trigger another Pin, which doesn't satisfy my requirements because I need to attach the handle to an IRQ Pin directly.

So in my code, when I press Button 0, the related handler function is called, which controls the LED3 on or off.

However, this code works all right under NCS v2.9.1, but doesn’t work on my build system.

 

I don’t know what steps are missing causing this difference, so I’d like to get some help. Thanks in advance.

The config is also attached to show that the related CONFIG for GPIOTE are enabled.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <stdio.h>
#include <nrfx_gpiote.h>
#include <nrfx_log.h>
#define LED3 NRF_GPIO_PIN_MAP( 1, 14 )
#define BTN0 NRF_GPIO_PIN_MAP( 1, 13 )
#define GPIOTE_INSTANCE_IDX 20
nrfx_gpiote_t const pio_instance = NRFX_GPIOTE_INSTANCE( GPIOTE_INSTANCE_IDX );
static void button_handler(nrfx_gpiote_pin_t pin,
nrfx_gpiote_trigger_t trigger,
void *context)
{
static bool flag = true;
printf("GPIO input event callback");
if(flag) {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
smtc-hal-mcu-nrf54l15.mknrfx_config_nrf54l15_application.h