PORT is an event that can be generated from multiple input pins using the GPIO DETECT signal.
The event will be generated on the rising edge of the DETECT signal. See GPIO — General purpose input/output for more information about the DETECT signal.
The GPIO DETECT signal will not wake the system up again if the system is put into System ON IDLE while the DETECT signal is high. Make sure to clear all DETECT sources before entering sleep. If the LATCH register is used as a source, a new rising edge will be generated on DETECT if any bit in LATCH is still high after clearing all or part of the register. This could occur if one of the PINx.DETECT signals is still high, for example. See Pin sense mechanism for more information.
Setting the system to System OFF while DETECT is high will cause a wakeup from System OFF reset.
This feature can be used to wake up the CPU from a WFI or WFE type sleep in System ON when all peripherals and the CPU are idle, meaning the lowest power consumption in System ON mode.
- Disable interrupts on the PORT event (through INTENCLR.PORT).
- Configure the sources (PIN_CNF[n].SENSE in GPIO).
- Clear any potential event that could have occurred during configuration (write '0' to EVENTS_PORT).
- Enable interrupts (through INTENSET.PORT).