本帖最后由 不爱说话 于 2019-4-4 13:19 编辑
Linux是有低功耗模式的(Low Power Mode),emcraft的STM32F7也实现了这个功能,它支持suspend to RAM模式。也就是电脑上常说的挂起到内存。
在STM32F750开发板上可以通过命令行使系统挂起,使用SW3 button唤醒系统(wake up)。
1. 系统正常启动,测量5V输入端电流,大约210mA
2. 在控制台输入系统挂起命令
/ # echo mem > /sys/power/state
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.007 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.014 seconds) done.
这时测得的系统电流消耗大约10mA(由于所用万用表只有10A档适合测量这个板子的电流,如果有合适的mA档其实应该更精确一些的)
3. 按下SW3 button系统恢复运行
dwc2 50000000.usb: suspending usb gadget g_serial
dwc2 50000000.usb: s3c_hsotg_ep_disable: called for ep0
dwc2 50000000.usb: s3c_hsotg_ep_disable: called for ep0
PM: suspend of devices complete after 5.553 msecs
PM: late suspend of devices complete after 4.632 msecs
PM: noirq suspend of devices complete after 2.482 msecs
PM: noirq resume of devices complete after 1.748 msecs
PM: early resume of devices complete after 2.316 msecs
dwc2 50000000.usb: resuming usb gadget g_serial
PM: resume of devices complete after 111.242 msecs
Restarting tasks ... done.
/ #
此时系统电流重新回到210mA左右。
|