Unable to use NFC1 / NFC2 pins as GPIO on nRF54L15 (Bare-metal SDK)

I am trying to repurpose NFC1 and NFC2 pins for GPIO usage, but they do not function as GPIO, while other GPIO pins work correctly.

  • SDK: nRF Connect Bare-metal SDK v0.9.0-9b7766ff2787
  • Board: nrf-bm/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp

What I have tried

  • DeviceTree overlay to disable NFC and use pins as GPIO
&uicr {
nfct-pins-as-gpios;
};
  • Manually disabling NFCT pads in code
NRF_NFCT_S->PADCONFIG = (NFCT_PADCONFIG_ENABLE_Disabled << NFCT_PADCONFIG_ENABLE_Pos);

Modified the LED sample to use NFC1 / NFC2 pins as output GPIO, but NFC pins do not toggle. Other non-NFC GPIOs work as expected using the same code.

I’ve attached the modified LED sample code below where NFC1/NFC2 are configured as GPIO (other GPIO works fine).

/*
 * Copyright (c) 2025 Nordic Semiconductor ASA
 *
 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
 */

#include <zephyr/kernel.h> /* k_busy_wait() */
#include <zephyr/sys_clock.h> /* USEC_PER_MSEC */
#include <zephyr/logging/log.h>
#include <zephyr/logging/log_ctrl.h>

#include <hal/nrf_gpio.h>

#include <board-config.h>

LOG_MODULE_REGISTER(app, CONFIG_LEDS_SAMPLE_LOG_LEVEL);

static void led_init(void)
{
	nrf_gpio_cfg_output(NRF_GPIO_PIN_MAP(1, 2));
	nrf_gpio_cfg_output(NRF_GPIO_PIN_MAP(1, 3));
	nrf_gpio_cfg_output(NRF_GPIO_PIN_MAP(1, 4));
}

static void led_on(void)
{
	nrf_gpio_pin_write(NRF_GPIO_PIN_MAP(1, 2), 1);
	nrf_gpio_pin_write(NRF_GPIO_PIN_MAP(1, 3), 1);
	nrf_gpio_pin_write(NRF_GPIO_PIN_MAP(1, 4), 1);
}

static void led_off(void)
{
	nrf_gpio_pin_write(NRF_GPIO_PIN_MAP(1, 2), 0);
	nrf_gpio_pin_write(NRF_GPIO_PIN_MAP(1, 3), 0);
	nrf_gpio_pin_write(NRF_GPIO_PIN_MAP(1, 4), 0);
}

int main(void)
{
    NRF_NFCT_S->PADCONFIG = (NFCT_PADCONFIG_ENABLE_Disabled << NFCT_PADCONFIG_ENABLE_Pos);
	LOG_INF("LEDs sample started");

	/* Initialize the LED */
	led_init();

	while (true) {
		while (LOG_PROCESS()) {
		}

		/* Turn the LED on */
		led_on();

		k_busy_wait(500 * USEC_PER_MSEC);

		/* Turn the LED off */
		led_off();

		k_busy_wait(500 * USEC_PER_MSEC);
	}

	return 0;
}

Thanks in advance for your help.

Parents Reply Children
No Data
Related