TS-7970 Silabs Sleep Mode: Difference between revisions

From embeddedTS Manuals
(Created page with "Even though the "tsmicroctl" command allows you to directly put the system to sleep, this is not usually what you want to directly call. This would be equivalent to pulling p...")
 
No edit summary
Line 1: Line 1:
Even though the "tsmicroctl" command allows you to directly put the system to sleep, this is not usually what you want to directly call.  This would be equivalent to pulling power to the system which can cause data loss.  When systemd shuts down it will call all executables in /lib/systemd/system-shutdown/.  You can create a script silabs-sleep in this directory with these contents:
The TS-7970 implements a very low power sleep mode using the onboard supervisory microcontroller.  This allows powering off the i.MX6 CPU entirely.  While in this mode the entire board will use about 26mW.
 
The board can be woken 3 ways:
* Timer - sleep mode requires specifying an amount of seconds to sleep  (up to 16777215).
* SW1 - Pressing the button on the side of the board.
* PUSH_SW# goes low on HD1.  The SW1 signal is brought to the header so connected cards can wake the TS-7970.
 
The sleep mode can be entered at a low level calling "tshwctl --sleep 60" 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 Yocto, Debian, or Ubuntu distributions use systemd to manage shutdown.  When systemd shuts down it will call all executables in /lib/systemd/system-shutdown/.  Create a script silabs-sleep in this directory with these contents:


<source lang=bash>
<source lang=bash>
#!/bin/bash
#!/bin/bash


tsmicroctl --sleep 10
tsmicroctl --sleep 60
</source>
</source>
And make it executable:
And make it executable:

Revision as of 10:57, 24 February 2017

The TS-7970 implements a very low power sleep mode using the onboard supervisory microcontroller. This allows powering off the i.MX6 CPU entirely. While in this mode the entire board will use about 26mW.

The board can be woken 3 ways:

  • Timer - sleep mode requires specifying an amount of seconds to sleep (up to 16777215).
  • SW1 - Pressing the button on the side of the board.
  • PUSH_SW# goes low on HD1. The SW1 signal is brought to the header so connected cards can wake the TS-7970.

The sleep mode can be entered at a low level calling "tshwctl --sleep 60" 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 Yocto, Debian, or Ubuntu distributions use systemd to manage shutdown. When systemd shuts down it will call all executables in /lib/systemd/system-shutdown/. Create a script silabs-sleep in this directory with these contents:

#!/bin/bash

tsmicroctl --sleep 60

And make it executable:

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

Now the board will sleep immediately following a shutdown. It is safe during the sleep mode to disconnect power.