How to get GPIO register state in GPIOTE handler

Hello Nordic! My question probably a simple one but I'm a novice so there's it. I'm looking for a way to get a GPIO port state that was at the moment of GPIOTE event triggering, inside the event handler. Is there any register I can read to get that?

The context: I'm trying to read a two line serial bus of TitanMicro TM1640. The start of transmission is designated by falling DIN line while SCLK line is still high. The time between falling DIN and falling SCLK is about 10 us, so when I'm reading the GPIO from the handler the SCLK is already low.

Parents Reply
  • Both DIN and SCLK are inputs for the nRF52840 in my case. And if that would be the current reading it will be the issue I described in the original post. The time difference between falling DIN and SCLK is 10 us so when I'm reading the GPIO input from the handler it's already past that time and the SCLK is already fallen low.

Children
No Data
Related