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

GPIO Interrupts not working on nrf52 DK

Hello 

Good day!

Problem: We have got a new nrf52DK, and in our application development we use GPIO interrupts (we have set up 4 gpio interrupts). Surprisingly the GPIO interrupts are not working or firing. We tried running Pin change interrupt example and it worked fine but the problem is it is not working for our setup gpio interrupt only one of them is working out of 4 interrupts. 

I have attached the code snippet. also included the sdk_config.h file. 

Kindly help us with this weird issue. 

void slb_gpios_init() {

  ret_code_t err_code;
  err_code = nrf_drv_gpiote_init();
  APP_ERROR_CHECK(err_code);

 
  /*SLB TSM12 interrupt on channel 1 pheripheral configuration.*/
  nrf_drv_gpiote_in_config_t slb_tms12_cap_config_button = GPIOTE_CONFIG_IN_SENSE_TOGGLE(false);
  slb_tms12_cap_config_button.pull = NRF_GPIO_PIN_PULLUP;

  err_code = nrf_drv_gpiote_in_init(SLB_CAP_OUT_CH1_INT, &slb_tms12_cap_config_button, slb_gpio_interrupt_handler);
  APP_ERROR_CHECK(err_code);

  /*SLB TSM12 interrupt on all channels pheripheral configuration.*/
  nrf_drv_gpiote_in_config_t slb_tms12_cap_config_wheel = GPIOTE_CONFIG_IN_SENSE_HITOLO(false);
  slb_tms12_cap_config_wheel.pull = NRF_GPIO_PIN_PULLUP;

  err_code = nrf_drv_gpiote_in_init(SLB_CAP_OUT_INTERRUPT, &slb_tms12_cap_config_wheel, slb_gpio_interrupt_handler);
  APP_ERROR_CHECK(err_code);

  /*SLB BQ24XX charger ACOK pin config.*/
  nrf_drv_gpiote_in_config_t slb_bq24_config = GPIOTE_CONFIG_IN_SENSE_TOGGLE(false);
  slb_bq24_config.pull = NRF_GPIO_PIN_PULLDOWN;

  err_code = nrf_drv_gpiote_in_init(SLB_BQ24715_ACOK, &slb_bq24_config, slb_gpio_interrupt_handler);
  APP_ERROR_CHECK(err_code);


  /*Enable TSM12C i2c port.*/
  nrf_gpio_cfg_output(SLB_CAP_I2C_ENABLE);

  /*Enable Touch button events.*/
  slb_cap_button_event_enable();

  /*Enable ACOK events.*/
  nrf_drv_gpiote_in_event_enable(SLB_BQ24715_ACOK, true);
}
sdk_config.h

Parents Reply Children
No Data
Related