软件上它当然没有去关其它外设,它只是写寄存器SCU_PWRMNG;写入010告诉CPU进入睡眠模式。但是参考手册明确写着,sleep模式是所有外设关闭的, – ARMCLK = OFF – FMICLK = OFF – HCLK = OFF – PCLK = OFF 如果硬件不会自己去关闭,那调用SCU_EnterSleepMode()怎么还能进入睡眠模式呢?
在参考手册(http://www.st.com/stonline/products/literature/rm/13902.pdf)的第36页,第3.3节,有这样一段: The STM32F10xxx devices feature three low-power modes: - Sleep mode (Cortex-M3 core stopped, peripherals kept running) - Stop mode (all clocks are stopped) - Standby mode (1.8V domain powered-off)
再请看参考手册的第3.3.2节“Peripheral clock gating”:To further reduce power consumption in Sleep mode the peripheral clocks can be disabled prior to executing the WFI or WFE instructions. 外部中断唤醒后,程序从外部中断服务程序开始恢复运行,中断退出后返回到WIF或WFE指令之后。
请看“STR912FA的技术参考手册”的第2.5.4节(Sleep mode),有这么一段:This is the lowest power mode of MCU. In this mode, all clock circuits (except RTC) and the oscillator pin (4-25MHz) are turned off. In this mode, the CPU does not continue to execute any instructions. All peripherals except the RTC have their clocks stopped. The ARM Flash Memory is put in power down mode at the same time as the ARM MCU.