void gpiote_event_handler(nrf_drv_gpiote_pin_t pin, nrf_gpiote_polarity_t action) { spi_read(); } static void DRDY_interrupt_init(void) { ret_code_t err_code; // NVIC_EnableIRQ(GPIOTE_IRQn); err_code = nrf_drv_gpiote_init(); APP_ERROR_CHECK(err_code); if (!nrf_drv_gpiote_is_init()) { nrf_drv_gpiote_init(); } nrf_drv_gpiote_in_config_t in_config = GPIOTE_CONFIG_IN_SENSE_HITOLO(false); // nrf_drv_gpiote_in_config_t in_config = GPIOTE_CONFIG_IN_SENSE_TOGGLE(true); in_config.pull = NRF_GPIO_PIN_PULLUP; err_code = nrf_drv_gpiote_in_init(DRDY_PIN, &in_config, gpiote_event_handler); APP_ERROR_CHECK(err_code); nrf_drv_gpiote_in_event_enable(DRDY_PIN, true); }
Hi we are having issues with gpiote interrupt. We would like to do some spi read when drdy gpio becomes high to low. I have done above configuration for the same.
We are using following set up
Segger Embedded studio. nRF5_SDK_15.2.0_9412b96 pca10056 soft device enabled, gpiote enabled. The project is based on ble_app_att_mtu_throughput example
Issues: when following code is executed
nrf_drv_gpiote_in_event_enable(DRDY_PIN, true);
the code get stuck in dummy handler in ses_startup_nrf52840.s.
What could be the issue for this??
We are not using any timer module for now but we might use this in future. So also wanted to know do we need to set different priority for gpiote interrupt and timer interrupt or is it not required.
How many gpiote channel can be used at once?
Please see what we have configured and let us know what went wrong.
Thanks