CONFIG_NRFX_GPIOTE error while building

Hi

I am getting an error while building source code. The same code used to build while using  NRF connect SDK version 2.5.1. Currently I am using nRF Connect SDK version 2.6.1

error: NRFX_GPIOTE (defined at C:/ncs/v2.6.1/zephyr/modules/hal_nordic\nrfx/Kconfig:70,
modules\hal_nordic\nrfx/Kconfig:70) is assigned in a configuration file, but is not directly user-
configurable (has no prompt). It gets its value indirectly from other symbols. See
docs.zephyrproject.org/.../kconfig.html and/or look up NRFX_GPIOTE in
the menuconfig/guiconfig interface. The Application Development Primer, Setting Configuration
Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful too.
Parsing C:/ncs/MyApps/Italtronic_homeauto/Kconfig
Loaded configuration 'C:/ncs/v2.6.1/zephyr/boards/arm/nrf52_italtronic_homeauto/nrf52_italtronic_homeauto_defconfig'
Merged configuration 'c:/ncs/MyApps/Italtronic_homeauto/prj.conf'67241.prj.conf

/*
 * Copyright (c) 2019 Nordic Semiconductor ASA
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#include <zephyr/kernel.h>
#include <nrfx_timer.h>
#include <nrfx_gpiote.h>
#include <helpers/nrfx_gppi.h>
#if defined(DPPI_PRESENT)
#include <nrfx_dppi.h>
#else
#include <nrfx_ppi.h>
#endif

// #include <zephyr/logging/log.h>
#include <zephyr/irq.h>
// LOG_MODULE_REGISTER(nrfx_ppi, LOG_LEVEL_INF);

#define INPUT_PIN DT_GPIO_PIN(DT_ALIAS(zcd), gpios)
#define OUTPUT_PIN DT_GPIO_PIN(DT_ALIAS(fpulse), gpios)

// #define INPUT_PIN 2+32 /*zcd = p0.2 */
// #define OUTPUT_PIN 3+32 /*fpulse = p0.3*/

#define MAX_FIRE 9000 /*microseconds*/
#define FIRE_PULSE_WIDTH 50 /*in microseconds*/
#define TRIAC_SWITCH_OFF 9200

const nrfx_timer_t timer_instance = NRFX_TIMER_INSTANCE(2);



void set_firing_angle(uint32_t fangle_t)
{

    printk("setting up firing angle %d\n", fangle_t);
    /*firing angle cannot be more than 10 ms*/
    if ((fangle_t > MAX_FIRE)&&(fangle_t!=TRIAC_SWITCH_OFF))
    {
        fangle_t = MAX_FIRE;
    }

    uint32_t timer_ticks = nrfx_timer_us_to_ticks(&timer_instance, fangle_t);
    printk("timer_ticks=%d\n",timer_ticks);
    nrfx_timer_compare(&timer_instance,NRF_TIMER_CC_CHANNEL0,timer_ticks,false);
    uint32_t timer_ticks_delta = nrfx_timer_us_to_ticks(&timer_instance, FIRE_PULSE_WIDTH);
    printk("timer_ticks_delta=%d\n",timer_ticks_delta);
    nrfx_timer_compare(&timer_instance, NRF_TIMER_CC_CHANNEL1, (timer_ticks + timer_ticks_delta), false);
}

/* static void zcd_evt_handler(nrfx_gpiote_pin_t pin,
                            nrfx_gpiote_trigger_t trigger,
                            void *context)
{
    printk("GPIO input event callback\n");
} */

int setup_ppi(void)
{
    printk("setting up PPI channels and endpoints\n");

    nrfx_err_t err;
    uint8_t in_channel, out_channel;
    uint8_t ppi_channel, ppi_channel1, ppi_channel2;

    // /* Connect GPIOTE_0 IRQ to nrfx_gpiote_irq_handler */
    // IRQ_CONNECT(DT_IRQN(DT_NODELABEL(gpiote)),
    //             DT_IRQ(DT_NODELABEL(gpiote), priority),
    //             nrfx_isr, nrfx_gpiote_irq_handler, 0);

    /* Initialize GPIOTE (the interrupt priority passed as the parameter
     * here is ignored, see nrfx_glue.h).
     */
/*     err = nrfx_gpiote_init(0);
    if (err != NRFX_SUCCESS)
    {
        printk("nrfx_gpiote_init error: 0x%08X", err);
        return 0;
    } */

/*     err = nrfx_gpiote_channel_alloc(&in_channel);
    if (err != NRFX_SUCCESS)
    {
        printk("Failed to allocate in_channel, error: 0x%08X", err);
        return 0;
    } */

    err = nrfx_gpiote_channel_alloc(&out_channel);
    if (err != NRFX_SUCCESS)
    {
        printk("Failed to allocate out_channel, error: 0x%08X", err);
        return 0;
    }

    /* Initialize input pin to generate event on high to low transition
     * (falling edge) and call button_handler()
     */
/*     static const nrfx_gpiote_input_config_t input_config = {
        .pull = NRF_GPIO_PIN_PULLUP,
    };
    const nrfx_gpiote_trigger_config_t trigger_config = {
        .trigger = NRFX_GPIOTE_TRIGGER_HITOLO,
        .p_in_channel = &in_channel,
    };
    static const nrfx_gpiote_handler_config_t handler_config = {
        .handler = zcd_evt_handler,
    }; */
/*     err = nrfx_gpiote_input_configure(INPUT_PIN,
                                      &input_config,
                                      &trigger_config,
                                      &handler_config);
    if (err != NRFX_SUCCESS)
    {
        printk("nrfx_gpiote_input_configure error: 0x%08X", err);
        return 0;
    }
 */
    static const nrfx_gpiote_output_config_t output_config = {
        .drive = NRF_GPIO_PIN_S0S1,
        .input_connect = NRF_GPIO_PIN_INPUT_DISCONNECT,
        .pull = NRF_GPIO_PIN_NOPULL,
    };
    const nrfx_gpiote_task_config_t task_config = {
        .task_ch = out_channel,
        .polarity = NRF_GPIOTE_POLARITY_LOTOHI, //NRF_GPIOTE_POLARITY_TOGGLE,
        .init_val = 0,
    };
    err = nrfx_gpiote_output_configure(OUTPUT_PIN,
                                       &output_config,
                                       &task_config);
    if (err != NRFX_SUCCESS)
    {
        printk("nrfx_gpiote_output_configure error: 0x%08X", err);
        return 0;
    }

/*     nrfx_gpiote_trigger_enable(INPUT_PIN, true); */
    nrfx_gpiote_out_task_enable(OUTPUT_PIN);

    printk("nrfx_gpiote initialized");

    /* Allocate a (D)PPI channel. */
    err = nrfx_gppi_channel_alloc(&ppi_channel);
    if (err != NRFX_SUCCESS)
    {
        printk("nrfx_gppi_channel_alloc error: 0x%08X - ppi_channel", err);
        return 0;
    }

    nrfx_timer_config_t timer_config = NRFX_TIMER_DEFAULT_CONFIG(1000000);
    err = nrfx_timer_init(&timer_instance, &timer_config, NULL);
    if (err != NRFX_SUCCESS)
    {
        printk("nrfx_timer_init error: %08x", err);
        return 0;
    }

    set_firing_angle(MAX_FIRE);

    nrfx_timer_enable(&timer_instance);
  

/*Setup a PPI channel to start the timer once the zero crossover is detected on INPUT_PIN*/
    nrfx_gppi_channel_endpoints_setup(ppi_channel,
		nrfx_gpiote_in_event_address_get(INPUT_PIN),
        nrfx_timer_task_address_get(&timer_instance, NRF_TIMER_TASK_CLEAR));

/*Setup a PPI channel to turn output pin high*/
	err = nrfx_gppi_channel_alloc(&ppi_channel1);
	if (err != NRFX_SUCCESS) {
        printk("nrfx_gppi_channel_alloc error: 0x%08X  - ppi_channel1", err);
        return 0;
	}

    nrfx_gppi_channel_endpoints_setup(ppi_channel1,
        nrfx_timer_compare_event_address_get(&timer_instance, NRF_TIMER_CC_CHANNEL0),
        //nrfx_gpiote_out_task_address_get(OUTPUT_PIN)
        nrfx_gpiote_set_task_address_get(OUTPUT_PIN));


/*Setup a PPI channel to turn output pin low*/
	err = nrfx_gppi_channel_alloc(&ppi_channel2);
	if (err != NRFX_SUCCESS) {
        printk("nrfx_gppi_channel_alloc error: 0x%08X  - ppi_channel2", err);
        return 0;
	}

    nrfx_gppi_channel_endpoints_setup(ppi_channel2,
    nrfx_timer_compare_event_address_get(&timer_instance, NRF_TIMER_CC_CHANNEL1),
    //nrfx_gpiote_out_task_address_get(OUTPUT_PIN)
    nrfx_gpiote_clr_task_address_get(OUTPUT_PIN));

	/* Enable the channels. */
	nrfx_gppi_channels_enable(BIT(ppi_channel));
    nrfx_gppi_channels_enable(BIT(ppi_channel1));
    nrfx_gppi_channels_enable(BIT(ppi_channel2));

	printk("(D)PPI configured, leaving setup_ppi()");
	return 0;
}

Related