Wakeup Source and Reason

Wakeup Source

The following table lists the wakeup sources that can be used to wake up the system under different power modes.

Wakeup source

Sleep CG

Sleep PG

Deep-Sleep

Restriction

WLAN

X

BT

X

IPC

X

Only KM0 can use the IPC to wake up KM4.

Basic Timer4~7

X

PMC Timer

X

For internal usage

UART0~2

X

  • When using UART as a wakeup source, the Rx clock source can only be OSC2M, and do not turn off OSC4M during sleep.

  • When the baudrate is larger than 115200, it is not recommended to use UART as a wakeup source.

  • The portion of the command used to wake up that exceeds the FIFO depth (64B) will be lost.

LOGUART

X

When using LOGUART as a wakeup source:

  • If the Rx clock source is XTAL40M, do not turn off XTAL or OSC4M during sleep.

  • If the Rx clock source is OSC2M, do not turn off OSC4M during sleep.

  • The portion of the command used to wake up that exceeds the FIFO depth (16B) will be lost.

GPIO

X

I2C

X

CAP_TOUCH

X

ADC

X

SDIO

X

Key-Scan

X

BOR

PWR_DOWN

AON_TIMER

AON_WAKEPIN

RTC

Wakeup Reason

Note

When wakeup, the corresponding peripheral interrupt will be raised; when clearing the interrupt, the corresponding bit in wakeup reason will also be cleared. Thus it is not possible to get the wakeup reason after the interrupt is cleared.

SOCPS_AONWakeReason

Items

Description

Introduction

Get the deep-sleep wakeup reason

Parameter

None

Return

  • Bit[0]: CHIP_EN short press

  • Bit[1]: CHIP_EN long press

  • Bit[2]: BOR

  • Bit[3]: AON Timer

  • Bit[5:4]: AON GPIO

  • Bit[8]: RTC

WAK_STATUS0

The following register can be used to get the sleep wakeup reason.

Register

Parameters

WAK_STATUS0

  • Bit[1:0]: WLAN

  • Bit[2]: KM4_WAKE

  • Bit[3]: BT_WAKE_HOST

  • Bit[4]: IPC_KM4

  • Bit[9:6]: BASIC TIMER4~7

  • Bit[11:10]: PMC TIMER0~1

  • Bit[14:12]: UART0~2

  • Bit[15]: UART_LOG

  • Bit[16]: GPIOA

  • Bit[17]: GPIOB

  • Bit[19:18]:I2C0~1

  • Bit[20]: Cap-Touch

  • Bit[21]: RTC

  • Bit[22]: ADC

  • Bit[24]: BOR

  • Bit[25]: PWR_DOWN

  • Bit[26]: Key-Scan

  • Bit[27]: AON_Timer

  • Bit[28]: AON_Wakepin

  • Bit[29]: SDIO