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

Start and stop RTC with PORT events on a single pin

Hi, i'm wondering if it's possible to make a GPIO pin trigger different tasks when it is externally driven from low to high, and high to low.

I'm trying to stop an RTC timer when a pin goes high and start it again when it goes low, using PPI. Do i need to allocate two GPIOTE channels? And how do i get the different event adresses?

I'm on the nRF52, and i'm not using SD, I also don't want the high frequency clock running.

Parents Reply
  • Sorry, I didn't see nRF52 in your message. I haven't used 52 a lot. But I think it is the same concept: Are you having problem using single pin for two tasks? I solved this issue by some tricks in nRF51 SDK: You need to use a "unused/fake" pin as a channel placeholder to hold the other channel for the "real" pin. and then change the "fake" pin back to the "real" pin by using nrf_gpiote_event_configure.

Children
No Data
Related