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

System Off and GPIOTE

I have multiple GPIOs that are configured to use GPIOTE in my application. When one of these GPIOs is in the active state I start timer. Once the timer expires I want to enter system off using sd_power_system_off() and I want the GPIO that started the timer to wakeup the system.

Do I need to disable the GPIOTE events for this pin before calling nrf_gpio_cfg_sense_set()?

What about peripherals and interrupts? Do peripherals need to be stopped and interrupts disabled before calling sd_power_system_off()?

Thanks, Darren

Parents
  • Hi,

    You should not need to disable the GPIOTE events for that pin. The only peripherals that are partially kept active in SYSTEM OFF are GPIO, LPCOMP and NFC. Remember that the nrf_gpio_cfg_sense_set()function only sets the SENSE field of the pin so the other fields (direction, pull etc) will be the same. nrf_gpio_cfg_sense_input() will set all fields.

    Other peripherals are not functional in SYSTEM OFF and are reset when the device wakes up after SYSTEM OFF, see here. So there is no need to stop the peripherals and disable interrupts before going to SYSTEM OFF.

    Ole

  • Ole,

    Thank you for the reply it helps!

    I have some follow up questions.

    My custom board has several GPIOs configured to use GPIOTE as I stated above. Out of all of these GPIOs I only want 1 to wake the processor up from System Off. Am I correct in thinking that I need to disable all of the GPIOTE events except for the 1 pin I want?

    Also I am a little confused between the using GPIOTE and nrf_gpio_cfg_sense_input() as which is the best to wake the processor up from System Off at the same allows the lowest power operation.

    Cheers, Darren

Reply
  • Ole,

    Thank you for the reply it helps!

    I have some follow up questions.

    My custom board has several GPIOs configured to use GPIOTE as I stated above. Out of all of these GPIOs I only want 1 to wake the processor up from System Off. Am I correct in thinking that I need to disable all of the GPIOTE events except for the 1 pin I want?

    Also I am a little confused between the using GPIOTE and nrf_gpio_cfg_sense_input() as which is the best to wake the processor up from System Off at the same allows the lowest power operation.

    Cheers, Darren

Children
No Data
Related