Hi,
I am using the pin change interrupt example provided in the SDK examples. By setting the input sense to NRF_GPIOTE_POLARITY_LOTOHI, the interrupt handler is called and in that i again set the input sense to NRF_GPIOTE_POLARITY_HITOLO so that next time it senses the high to low edge. But it never senses HITOLO. I am not able to find the reason for why this is happening.
Here is a example of the code
nrf_drv_gpiote_init();
nrf_drv_gpiote_out_init = GPIOTE_CONFIG_OUT_SIMPLE(false);
nrf_drv_gpiote_in_config_t in_config;
in_config.sense = NRF_GPIOTE_POLARITY_LOTOHI;
nrf_drv_gpiote_in_init(PIN_IN, &in_config, gpiote_event_handler);
Now in the event handler gpiote_event_handler case GPIOTE_CONFIG_POLARITY_LoToHi gets called in which i perform LED toggling and set the
in_config.sense = NRF_GPIOTE_POLARITY_HITOLO
Now the next time it should sense High to Low Edge but it never goes into the case GPIOTE_CONFIG_POLARITY_HiToLo
What could be the reason for this? I am using S110 and SDK10.