本文主要是介绍IMX8休眠唤醒,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
电源状态:
root@OpenWrt:/# cat /sys/power/state
freeze mem
设置调试串口唤醒源
root@OpenWrt:/# echo enabled > /sys/class/tty/ttymxc1/power/wakeup 【12V 210MA】
设置休眠:M4也会被休眠
root@OpenWrt:/# echo mem > /sys/power/state 【12V 58mA】
[ 739.503091] PM: suspend entry (deep)
[ 739.508249] PM: Syncing filesystems ... done.
[ 739.513189] Freezing user space processes ... (elapsed 0.001 seconds) done.
[ 739.521337] OOM killer disabled.
[ 739.524578] Freezing remaining freezable tasks ... (elapsed 0.379 seconds) done.
[ 739.911532] Suspending conzsole(s) (use no_console_suspend to debug)root@OpenWrt:/# echo mem > /sys/power/state
[ 273.782435] PM: suspend entry (deep)
[ 273.786085] PM: Syncing filesystems ... done.
[ 273.791414] Freezing user space processes ... (elapsed 0.001 seconds) done.
[ 273.800408] OOM killer disabled.
[ 273.803640] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[ 273.812246] Suspending console(s) (use no_console_suspend to debug)
串口回车唤醒:
[ 273.952998] PM: suspend devices took 0.136 seconds
[ 273.958099] Disabling non-boot CPUs ...
[ 273.972436] CPU1: shutdown
[ 273.991712] psci: Retrying again to check for CPU kill
[ 273.991716] psci: CPU1 killed.
[ 274.016351] CPU2: shutdown
[ 274.035711] psci: Retrying again to check for CPU kill
[ 274.035715] psci: CPU2 killed.
[ 274.052287] CPU3: shutdown
[ 274.071706] psci: Retrying again to check for CPU kill
[ 274.071710] psci: CPU3 killed.
[ 274.073794] Enabling non-boot CPUs ...
[ 274.074211] Detected VIPT I-cache on CPU1
[ 274.074238] GICv3: CPU1: found redistributor 1 region 0:0x0000000051b20000
[ 274.074276] CPU1: Booted secondary processor [410fd042]
[ 274.074759] cache: parent cpu1 should not be sleeping
[ 274.074962] CPU1 is up
[ 274.075306] Detected VIPT I-cache on CPU2
[ 274.075324] GICv3: CPU2: found redistributor 2 region 0:0x0000000051b40000
[ 274.075344] CPU2: Booted secondary processor [410fd042]
[ 274.075632] cache: parent cpu2 should not be sleeping
[ 274.075846] CPU2 is up
[ 274.076189] Detected VIPT I-cache on CPU3
[ 274.076207] GICv3: CPU3: found redistributor 3 region 0:0x0000000051b60000
[ 274.076228] CPU3: Booted secondary processor [410fd042]
[ 274.076528] cache: parent cpu3 should not be sleeping
[ 274.076729] CPU3 is up
[ 274.115719] PM: resume devices took 0.020 seconds
[ 274.117705] imx-lpi2c 37230000.i2c: can't get irq number
[ 274.120557] OOM killer enabled.
[ 274.245039] Restarting tasks ... done.
[ 274.249687] PM: suspend exit
M4不会被休眠,但过一段时间会重启,为何?
root@OpenWrt:/# echo freeze > /sys/power/state 【12V 124mA】
[ 8330.945402] PM: suspend entry (s2idle)
[ 8330.949255] PM: Syncing filesystems ... done.
[ 8330.954073] Freezing user space processes ... (elapsed 0.001 seconds) done.
[ 8330.962238] OOM killer disabled.
[ 8330.965465] Freezing remaining freezable tasks ... (elapsed 0.423 seconds) done.
[ 8331.396049] Suspending console(s) (use no_console_suspend to debug)root@OpenWrt:/# echo freeze > /sys/power/state
[ 380.385262] PM: suspend entry (s2idle)
[ 380.389094] PM: Syncing filesystems ... done.
[ 380.394123] Freezing user space processes ... (elapsed 0.001 seconds) done.
[ 380.403106] OOM killer disabled.
[ 380.406348] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[ 380.414946] Suspending console(s) (use no_console_suspend to debug)
[ 380.433761] PM: suspend devices took 0.012 seconds
[ 384.616786] imx-lpi2c 37230000.i2c: can't get irq number
[ 384.618081] PM: resume devices took 0.020 seconds
[ 384.633008] OOM killer enabled.
[ 384.636159] Restarting tasks ... done.
[ 384.642229] PM: suspend exit
suspend entry打印位置:./kernel/power/suspend.c +606
电源通用控制GPC:《IMX8MMRM.PDF》5.2 General Power Controller (GPC)
模式:
RUN mode
Low power modeWAIT modeSTOP mod
Deep Sleep Mode
流程:
LPM Sleep Process
LPM Wake Up ProcessExample Code
这篇关于IMX8休眠唤醒的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!