getting error while trying to add goiote

hello,

i am using ncs 1.9.1 with nrf5340 custom board and trying to add gpiote interupt but getting the following error 

C:/ncs-1.9.1/applications/nrf_version5/build/zephyr/zephyr_pre1.elf --intlist isrList.bin --sw-isr-table --vector-table"
gen_isr_tables.py: error: multiple registrations at table_index 13 for irq 13 (0xd)
Existing handler 0x1e62f, new handler 0x1e62f
Has IRQ_CONNECT or IRQ_DIRECT_CONNECT accidentally been invoked on the same irq multiple times?

i have added these in source file

static void button_handler(nrfx_gpiote_pin_t pin, nrf_gpiote_polarity_t action)
{
    printk("came to button handler\n");
    LOG_INF("GPIO input event callback");
}
**************in main*****************
/* 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) {
        LOG_ERR("nrfx_gpiote_init error: %08x", err);
        return;
    }

    nrfx_gpiote_in_config_t const in_config = {
        .sense = NRF_GPIOTE_POLARITY_HITOLO,
        .pull = NRF_GPIO_PIN_PULLUP,
        .is_watcher = false,
        .hi_accuracy = true,
        .skip_gpio_setup = false,
    };

    /* Initialize input pin to generate event on high to low transition
     * (falling edge) and call button_handler()
     */
    err = nrfx_gpiote_in_init(INPUT_PIN, &in_config, button_handler);
    if (err != NRFX_SUCCESS) {
        LOG_ERR("nrfx_gpiote_in_init error: %08x", err);
        return;
    }
nrfx_gpiote_in_event_enable(INPUT_PIN, true);
in prof.conf
CONFIG_NRFX_GPIOTE=y
am i missing something and may i know why these error occurs?
thanks and regards
manikandan v
Parents Reply Children
No Data
Related