This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

GPIOTE interrupt with high accuracy and no_accuracy

hi support team,

very strange question from customer

customer set up one interrupt with following code:

void gpio_wakeup_init(void)
{
uint32_t err_code;
if (!nrf_drv_gpiote_is_init())
{
err_code = nrf_drv_gpiote_init();
APP_ERROR_CHECK(err_code);
}
nrf_drv_gpiote_in_config_t config = GPIOTE_CONFIG_IN_SENSE_TOGGLE(false);
config.pull = NRF_GPIO_PIN_PULLUP;
err_code = nrf_drv_gpiote_in_init(RX_PIN_NUMBER, &config, gpiote_event_handler);
APP_ERROR_CHECK(err_code);
nrf_drv_gpiote_in_event_enable(RX_PIN_NUMBER, true);
}

and somehow made one mistake, reset the RX_PIN_NUMBER to output:       nrf_gpio_cfg_output(RX_PIN_NUMBER);

and of course this port event can't work,

but if they set GPIOTE_CONFIG_IN_SENSE_TOGGLE(true);, this isense event interrupt works, i can't find the reason, could you please help on this?

Regards,

William.

Parents
  • Hi William

    As shown here each GPIO pin has various override signals, that will be activated by certain peripherals when they are assigned to that pin. 

    The override signals can override the setting in the GPIO registers, and change things such as direction (input/output) and output state when the peripheral is assigned to the pin. 

    When you assign a GPIOTE IN channel to a pin it will use these override signals to configure the pin as an input, but this will not happen when you just use the PORT event. 

    Best regards
    Torbjørn

Reply
  • Hi William

    As shown here each GPIO pin has various override signals, that will be activated by certain peripherals when they are assigned to that pin. 

    The override signals can override the setting in the GPIO registers, and change things such as direction (input/output) and output state when the peripheral is assigned to the pin. 

    When you assign a GPIOTE IN channel to a pin it will use these override signals to configure the pin as an input, but this will not happen when you just use the PORT event. 

    Best regards
    Torbjørn

Children
No Data
Related