ユーザ用ツール

サイト用ツール


mae3xx_tips:wakeup_by_rtc:start

差分

この文書の現在のバージョンと選択したバージョンの差分を表示します。

この比較画面にリンクする

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
mae3xx_tips:wakeup_by_rtc:start [2014/07/14 17:22]
admin
mae3xx_tips:wakeup_by_rtc:start [2020/08/24 16:15] (現在)
admin [方法]
ライン 1: ライン 1:
 +====== RTCによるStandby状態からのWakeup ======
 +
 +MA-E3xx は、RTC のアラームにより Standby 状態から Wakeupすることができます。\\
 +これにより、
 +  * 夜中の時間帯は Standby 状態として消費電力を抑える
 +  * 一定時間データ処理を行い、不要なときには Standby 状態として消費電力を抑える。例えば、5秒間起動、55秒間 Standby する。
 +
 +といった制御が可能となります。\\
 +
 +\\
 +
 +===== 方法 =====
 +
 +rtcwake コマンドを利用します。
 +
 +<​code>​
 +user1@plum:​~$ sudo rtcwake -h
 +
 +Usage:
 + ​rtcwake [options]
 +
 +Options:
 + -d, --device <​device> ​   select rtc device (rtc0|rtc1|...)
 + -n, --dry-run ​           does everything, but suspend
 + -l, --local ​             RTC uses local timezone
 + -m, --mode <​mode> ​       standby|mem|... sleep mode
 + -s, --seconds <​seconds> ​ seconds to sleep
 + -t, --time <​time_t> ​     time to wake
 + -u, --utc                RTC uses UTC
 + -v, --verbose ​           verbose messages
 + -V, --version ​           show version
 +
 +For more information see rtcwake(8).
 +user1@plum:​~$
 +</​code>​
 +
 +MA-E3xx では、device (-d) と mode (-m) に指定できる引数は下記固定となります。
 +
 +|< 25em 6em 6em 8em >|
 +^  Option ​ ^  Argument ​ ^  Note  |
 +|  device(-d) ​ |  rtc1  |  SoC内蔵RTC ​ |
 +|  mode(-m) ​ |  standby ​ |  スタンバイモード ​ |
 +
 +\\
 +
 +==== 実行例 ====
 +
 +=== Standby 状態に入り、1分後に Wakeup する ===
 +
 +<​code>​
 +user1@plum:​~$ sudo rtcwake -d rtc1 -m standby -s 60
 +rtcwake: wakeup from "​standby"​ using /dev/rtc1 at Mon Jul 14 08:16:26 2014
 +user1@plum:​~$
 +</​code>​
 +
 +\\
 +
 +=== Standby 状態に入り、指定時刻に Wakeup する ===
 +
 +例として、2014/​07/​14 17:21:00 に Wakeup するよう設定してみます。\\
 +RTC は UTC で動作しているので、オプションに -u をつけるのがポイントです。
 +
 +<​code>​
 +user1@plum:​~$ sudo rtcwake -d rtc1 -m standby -u -t `date +%s -d "​2014-07-14 17:​21:​00"​`
 +rtcwake: wakeup from "​standby"​ using /dev/rtc1 at Mon Jul 14 08:21:00 2014
 +user1@plum:​~$
 +</​code>​
 +
 +\\
 +
 +==== ログ ====
 +
 +Kernel のログ (dmesg) には、下のようなログが記録されます。
 +
 +<​code>​
 +[14502.800321] PM: Syncing filesystems ... done.
 +[14502.800457] PM: Preparing system for standby sleep
 +[14502.801016] Freezing user space processes ... (elapsed 0.001 seconds) done.
 +[14502.803089] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
 +[14502.804380] PM: Entering standby sleep
 +[14502.804403] Suspending console(s) (use no_console_suspend to debug)
 +[14502.913778] PM: suspend of devices complete after 108.703 msecs
 +[14502.914407] PM: late suspend of devices complete after 0.615 msecs
 +[14502.915159] PM: noirq suspend of devices complete after 0.732 msecs
 +[14502.915217] PM: Successfully put all powerdomains to target state
 +[14502.915217] PM: Wakeup source RTC Alarm
 +[14502.929177] PM: noirq resume of devices complete after 13.801 msecs
 +[14502.929824] PM: early resume of devices complete after 0.479 msecs
 +[14502.930632] net eth0: initializing cpsw version 1.12 (0)
 +[14502.992531] net eth0: phy found, phy addr = 2
 +[14503.157057] PM: resume of devices complete after 227.206 msecs
 +[14503.157742] PM: Finishing wakeup.
 +[14503.157752] Restarting tasks ... done.
 +[14510.342242] libphy: 4a101000.mdio:​02 - Link is Up - 1000/Full
 +</​code>​
  
mae3xx_tips/wakeup_by_rtc/start.1405326167.txt.bz2 · 最終更新: 2014/07/14 17:22 by admin