TS-7180 Sleep mode

From embeddedTS Manuals
Revision as of 12:07, 1 July 2021 by Mark (talk | contribs)

This board implements a low power sleep mode using the onboard supervisory microcontroller. The microcontroller is able to power off the remainder of the board while only drawing a few mW. This is effectively a shutdown/startup for Linux to startup/resume from this low power sleep.

The board can wake 3 ways:

  • Timer - A number of milliseconds are specified for a sleep.
* 1000ms minimum to 4294967295 (49.7 days) maximum
  • SW1 - Pressing the button on the side of the board.
  • P5-B pin 8 WAKE_UP is asserted (over 1.5V). This signal is active high and supports 0-40V input, such as an ignition switch.

The sleep mode can be entered by calling 'silabs sleep 60000' to sleep for 60 seconds, but this typically should not be called directly. This would be equivalent to disconnecting power while booted which can cause data loss.

The Debian distribution uses systemd to manage shutdown. When systemd shuts down it will call all executables in the "/lib/systemd/system-shutdown/". Create a script with the name of "silabs-sleep" in said directory with these contents:

#!/bin/bash

silabs sleep 60000

And make it executable:

chmod a+x /lib/systemd/system-shutdown/silabs-sleep

Now the board will sleep immediately following a shutdown. For example:

shutdown -h now

The board will power off on shutdown, and 60 seconds later automatically power back up.