SPM R12寄存器记录MCU的唤醒源,MCU被唤醒时log中会将具体唤醒源打印:
#define R12_PCM_TIMER_EVENT (1U << 0) ----> SPM 定时器唤醒,基本不会有,只有当系统没有其他唤醒源时,超过1h,才会有此timer唤醒,可以理解为SPM 里面的看门狗
#define R12_SPM_TWAM_IRQ_B (1U << 1) ----> SPM 用来debug的中断,不会有
#define R12_KP_IRQ_B (1U << 2) ----> 按键中断
#define R12_APWDT_EVENT_B (1U << 3) ----> AP侧的WDT(看门狗)中断
#define R12_APXGPT1_EVENT_B (1U << 4) ----> APXGPT,这个是system timer,对应到软件的hrtimer,只有在idle时才有
#define R12_CONN2AP_SPM_WAKEUP_B (1U << 5) ----> CONN,WCN的中断,wifi/BT/GPS/FM的唤醒
#define R12_EINT_EVENT_B (1U << 6) ----> 外部中断唤醒,譬如PMIC EINT,这类唤醒比较常见
#define R12_CONN_WDT_IRQ_B (1U << 7) ----> CONN的WDT(看门狗)中断
#define R12_CCIF0_EVENT_B (1U << 8) ----> Modem的CCIF0唤醒,譬如,网络唤醒,网络URC唤醒,这类唤醒比较常见
#define R12_LOWBATTERY_IRQ_B (1U << 9) ----> 低电池唤醒,基本没有
#define R12_SC_SSPM2SPM_WAKEUP (1U << 10) ----> SSPM唤醒,基本没有
#define R12_SC_SCP2SPM_WAKEUP (1U << 11) ----> sensor hub唤醒
#define R12_SC_ADSP2SPM_WAKEUP (1U << 12) ----> ADSP 也就是audio之类的唤醒,基本没有
#define R12_PCM_WDT_EVENT_B (1U << 13) ---->跟1是类似
#define R12_USBX_CDSC_B (1U << 14) ---->USB 唤醒
#define R12_USBX_POWERDWN_B (1U << 15) ---->USB 唤醒
#define R12_SYS_TIMER_EVENT_B (1U << 16) ---->跟4类似
#define R12_EINT_EVENT_SECURE_B (1U << 17) ---->跟 SECURE EINT唤醒
#define R12_CCIF1_EVENT_B (1U << 18) ---->跟8类似
#define R12_UART0_IRQ_B (1U << 19) ---->uart 0唤醒
#define R12_AFE_IRQ_MCU_B (1U << 20) ---->AFE,audio相关的唤醒
#define R12_THERMAL_CTRL_EVENT_B (1U << 21) ---->Thermal的唤醒
#define R12_SYS_CIRQ_IRQ_B (1U << 22) ----> CIRQ的唤醒,系统休眠时会将GIC backup到CIRQ
#define R12_MD2AP_PEER_WAKEUP_EVENT (1U << 23) ----> 数据业务唤醒
#define R12_CSYSPWREQ_B (1U << 24) ----> debug用
#define R12_MD1_WDT_B (1U << 25) ----> Modem的WDT(看门狗)唤醒
#define R12_AP2AP_PEER_WAKEUP_EVENT (1U << 26) ----> 数据业务唤醒
#define R12_SEJ_EVENT_B (1U << 27) ----> SEJ模块唤醒
#define R12_SPM_CPU_WAKEUP_EVENT (1U << 28) ----> CPU唤醒
#define R12_CPU_IRQOUT (1U << 29) ----> CPU唤醒
#define R12_CPU_WFI (1U << 30) ----> CPU唤醒
#define R12_MCUSYS_IDLE_TO_EMI_ALL (1U << 31) ----> CPU唤醒