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 mode
	WAIT mode
	STOP mod
Deep Sleep Mode

流程:

LPM Sleep Process
LPM Wake Up Process

Example Code

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值