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
  • GPIOTE will not wake the processor up from SYSTEM OFF, the sense mechanism in the GPIO peripheral will. If you enable the sense mechanism, a DETECT signal will be generated if the correct sense is detected on one of the pins. As the specification says this can be used to:

    • POWER: uses the DETECT signal to exit from System OFF.
    • GPIOTE: uses the DETECT signal to generate the PORT event.

    Before you enter SYSTEM OFF you need to disable the sense mechanism for the pins that are not going to wake up the chip and enable it on the one that are going to wake up the chip.

    Also, if you use GPIOTE in port event mode (low power mode or hi_accuracy = false):

    GPIOTE_CONFIG_IN_SENSE_...(false);
    

    The sense mechanism will be set for that pin.

Reply
  • GPIOTE will not wake the processor up from SYSTEM OFF, the sense mechanism in the GPIO peripheral will. If you enable the sense mechanism, a DETECT signal will be generated if the correct sense is detected on one of the pins. As the specification says this can be used to:

    • POWER: uses the DETECT signal to exit from System OFF.
    • GPIOTE: uses the DETECT signal to generate the PORT event.

    Before you enter SYSTEM OFF you need to disable the sense mechanism for the pins that are not going to wake up the chip and enable it on the one that are going to wake up the chip.

    Also, if you use GPIOTE in port event mode (low power mode or hi_accuracy = false):

    GPIOTE_CONFIG_IN_SENSE_...(false);
    

    The sense mechanism will be set for that pin.

Children
No Data
Related