32.3.2 EM4 Wake-up
It is possible to trigger a wake-up from EM4 using any of the selectable EM4WU GPIO pins. The wake-up request can be triggered
through the pins by enabling the corresponding bit in the GPIO_EM4WUEN register. When EM4 wake-up is enabled for the pin, the
input filter is enabled during EM4. This is done to avoid false wake-up caused by glitches. In addition, the polarity of the EM4 wake-up
request can be selected using the GPIO_EXTILEVEL register.
GPIO_EXTILEVEL
Wake-up Logic
GPIO_EM4WUEN
GPIO_IF
Wake-up request
GPIO_IFC
GPIO_IEN
Figure 32.5. EM4 Wake-up Logic
The pins used for EM4 wake-up must be configured as inputs with glitch filters using the GPIO_Px_MODEL/GPIO_Px_MODEH regis-
ter. If the input is disabled and the wakeup polarity is low, a false wakeup will occur when entering EM4. If the input is enabled, the
glitch filtered is disabled, and the polarity is set low, a glitch will occur when going into EM4 that will cause an immediate wake-up.
Before going down to EM4, it is important to clear the wake-up logic by setting the GPIO_IFC bit, which clears the wake-up logic, in-
cluding the GPIO_IF register. It is possible to determine which pin caused the EM4WU by reading the GPIO_IF register. The mapping
between EM4WU pins and the bit indexes in the GPIO_EM4WUEN, GPIO_EXTILEVEL, GPIO_IFC, GPIO_IFS, GPIO_IEN, and
GPIO_IF registers is as follows:
Table 32.2. EM4WU Register Bit Index to EM4WU Pin Mapping
EM4WU Register Bit Indexes
EM4WU Pin
16
GPIO_EM4WU0
17
GPIO_EM4WU1
18
GPIO_EM4WU2
19
GPIO_EM4WU3
...
...
31
GPIO_EM4WU15
Note:
See the device data sheet for actual pin location
32.3.3 EM4 Retention
By default, GPIO pins revert back to their reset state when EM4 is entered. The GPIO pins can be configured to retain the settings for
output enable, output value, pull enable, pull direction and over voltage tolerance while in EM4.
EM4 GPIO retention is controlled with the EM4IORETMODE field in the EMU_EM4CTRL register. Setting EM4IORETMODE to
EM4EXIT will cause retention to persist while in EM4 and reset the GPIOs during wakeup. Setting EM4IORETMODE to SWUNLATCH
will cause the retention to persist until the EM4UNLATCH bit is written by software. Note that when using SWUNLATCH, the GPIO reg-
ister values are still reset on wakeup from EM4. In order to ensure that the GPIO state does not change, sofware must re-write the
GPIO registers before setting EM4UNLATCH and ending EM4 GPIO retention. See the EMU chapter for additional documentation on
its registers and the EM4UNLATCH bit.
Reference Manual
GPIO - General Purpose Input/Output
silabs.com
| Building a more connected world.
Rev. 1.1 | 1088