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

Pin interrupt triggered without transitioning from HI-to-LOW

I am using an ADC where the SPI MISO pin also acts as a data ready pin when it transitions from Hi-to-Low as detailed in the link below. I am able to configure this and it works as intended when I configure the pin to be high accuracy  NRFX_GPIOTE_CONFIG_IN_SENSE_HITOLO(true).

https://devzone.nordicsemi.com/f/nordic-q-a/25047/are-spi-interrupt-disabled-in-gpiote-handler

 

my configurations:

nrfx_gpiote_in_config_t adc_drdy_pin_config = NRFX_GPIOTE_CONFIG_IN_SENSE_HITOLO(true);
err_code = nrf_drv_gpiote_in_init(SPI_MISO_PIN, &adc_drdy_pin_config, adc_drdy_interrupt_handler);
APP_ERROR_CHECK(err_code);
nrfx_gpiote_in_event_enable(SPI_MISO_PIN, false);

the adc_drdy_interrupt_handler gets triggered as soon as the nrfx_gpiote_in_event_enable(SPI_MISO_PIN, false) function is executed. note that I am not even enabling the interrupt event. how can this be happening?

the pin starts low but the handler should NOT be getting triggered since the pin did NOT transition from high to low. if i run the app with NRFX_GPIOTE_CONFIG_IN_SENSE_HITOLO(true), everything functions as it should. I am trying to lower my power consumption and I am using SDK 15.0.0 and S132. I have been at this problem for days and any help would be greatly appreciated.

Parents Reply Children
No Data
Related