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

2 GPIOTE Interrupts, Only one of the handler functions being hit

Hello:

I dont seem to understand what the problem is. I have 2 external ICs, one is an IMU and the other is a CDC. Both have interrupt pins connected to the nordic nRF52832 pins 12 and 26. I configure the pins as shown bellow.

nrf_drv_gpiote_in_config_t in_config = GPIOTE_CONFIG_IN_SENSE_HITOLO(true);

err_code = nrf_drv_gpiote_in_init(CDC_INT_PIN, &in_config, in_pin_handler);

APP_ERROR_CHECK(err_code);

nrf_drv_gpiote_in_config_t in_config2 = GPIOTE_CONFIG_IN_SENSE_LOTOHI(true);

in_config2.pull = NRF_GPIO_PIN_PULLDOWN;

err_code = nrf_drv_gpiote_in_init(IMU_INT1_PIN, &in_config2, IMU_INT1_pin_handler);

APP_ERROR_CHECK(err_code);

nrf_drv_gpiote_in_event_enable(IMU_INT1_PIN, true);

nrf_drv_gpiote_in_event_enable(CDC_INT_PIN, true);

I can see the in_pin_handler being hit while the IMU_INT1_pin_handler does not. I do not have any other high accuracy events configured. The IMU interrupt is triggered aprox. at 104 Hz while the CDC is at 100 Hz. Can anyone please help explain what I am doing wrong here. Your time and effort will be greatly appreciated.

Regards,

Parents
  • No, the function names can be different, i.e. you can use both in_pin_handler and IMU_INT1_pin_handler. I have tried reproducing the issue using SDK 11, but I’m not seeing any problems here. Please make sure that the IMU is connect to the correct nRF-pin(IMU_INT1_PIN). Did you try debug mode? Exactly how are you checking if the interrupt is triggered?

    Also make sure that nothing is reconfiguring the pin later in you program. i.e. check that GPIOTE register and GPIO P0 register are correct.

Reply
  • No, the function names can be different, i.e. you can use both in_pin_handler and IMU_INT1_pin_handler. I have tried reproducing the issue using SDK 11, but I’m not seeing any problems here. Please make sure that the IMU is connect to the correct nRF-pin(IMU_INT1_PIN). Did you try debug mode? Exactly how are you checking if the interrupt is triggered?

    Also make sure that nothing is reconfiguring the pin later in you program. i.e. check that GPIOTE register and GPIO P0 register are correct.

Children
No Data
Related