Arm Community
Arm Community
  • Site
  • User
  • Site
  • Search
  • User
Open Source Software and Platforms
Open Source Software and Platforms
Wiki System Suspend to RAM
  • Help
  • Jump...
  • Cancel
  • About this wiki
  • Supported platforms
  • Obtaining support
  • +Arm Reference Platforms deliverables
  • +A-class platforms
  • +M-class platforms
  • +R-class platforms
  • +FPGA prototyping boards
  • -Open source software
    • -Linux/Android
      • ------- Power management -------
      • cpufreq (DVFS)
      • cpuidle (hotplug)
      • +Energy Aware Scheduling (EAS)
      • System Suspend to RAM
      • ------- Configuration -------
      • +Device Tree
      • Modify Linux kernel config flags in the Arm Platforms deliverables
      • ----- Virtualization -----
      • Spawn a Linux virtual machine on Arm using QEMU (KVM)
      • ------- User-space -------
      • Android
      • Debian
      • Fedora Server
      • OpenEmbedded
      • Build a Buildroot user-space
      • Build an ILP32 user-space
      • BusyBox
    • +Trusted Firmware-A
    • Trusted Firmware-M
    • +EDK II UEFI
    • OP-TEE
    • +U-Boot
    • Robotics
    • Mbed OS
    • +SCP

System Suspend to RAM

Arm Platforms 16.05 onwards supports System Suspend to RAM.

To test this functionality:

Configure wakeup source

The PL031 RTC can be programmed to generate an interrupt after a set time, which will be used to wake the system from suspend. The PL031 RTC driver is supported in the `latest-armlt' kernel. Note that the kernel will need to be built with the `CONFIG_RTC_DRV_PL031' config flag set, which is already enabled by default in the Arm Reference Platforms deliverables.

Testing

Linaro OpenEmbedded LAMP 16.04 was used to test this functionality.

First identify the correct RTC `sysfs' interface:

$ grep /sys/class/rtc/rtc*/name

This should list `pl031' and if found determine whether that corresponds to `rtc0' or `rtc1' etc.

Next initiate the suspend and resume sequence:

/* Set the wakeup alarm for 30s */
# echo +30 > /sys/class/rtc/rtc0/wakealarm
/* Suspend system to RAM */
# echo -n mem > /sys/power/state

You should see suspend state messages and then no further activity on the console until wakeup. Once the wakeup alarm ticks you will see messages about CPUs being brought back up and the console will start working again.

Note: If you have an Ubuntu or Debian filesystem you can use the `rtcwake' utility to suspend and resume with a single command:

# rtcwake -d /dev/rtc0 -s 30 -m mem
  • Linaro
  • Tutorial
  • Linux
  • Share
  • History
  • More
  • Cancel
Related
Recommended