I am using the GPIOTE driver to attach interrupts to a pin in a very timing critical environment (using sensors like this).
To me, it seems like there is quite the significant delay between the signal on the pin and the handler function call.
The interrupt listens for TOGGLE, so both directions should trigger.
Sometimes though, although HITOLO triggers the interrupt, by the time the interrupt vector is called, the sensor already reports HI.
Sadly, the nrf_gpiote_polarity_t only reports NRF_GPIOTE_POLARITY_TOGGLE, not the actual direction of the signal.
Now the question:
Is there any way to get the interrupt direction in an interrupt handler handling TOGGLE interrupts without reading the pin additionally?
Can i somehow hack the driver to report HITOLO/LOTOHI to the handler function with a TOGGLE interrupt instead of NRF_GPIOTE_POLARITY_TOGGLE?