AM37x Wireless Connectivity Suspend Resume WOWLAN Operation

'''  Content is no longer maintained and is being kept for reference only! '''

Mode of Operation
On Suspend state, the wl1271 chip will stay connected to WiFI network and will wait for specific "magic" frame on the WiFi media and only uppon receiving that frame, it will wake up the Host.

How to operate Suspend Resume
to enable the omap to enter sleep, low voltage, & low power perform the following: mount -t debugfs debugfs /tmp/ echo 1 > /tmp/pm_debug/enable_off_mode echo 1 > /tmp/pm_debug/sleep_while_idle echo 1 > /tmp/pm_debug/voltage_off_while_idle Before we enter suspend mode we need to declare which event triggers the wake up. In this example we will set the trigger to any which means any event (console activity, magic frame, etc) will wake up the board: iw phy0 wowlan enable any To enter suspend mode type: echo mem > /sys/power/state To Resume from suspend: There are 2 option to resume from Suspend
 * 1) Serial console activity or other configured wakeup sources (keypad, touchscreen) will trigger resume
 * 2) Send Magic frame from other Station to the Station that is in suspend mode

Hardware Setup
In this setup we have: the Procedure will be as followes: Enter the first EVM to Suspend mode, by calling the following command: root@am37x-evm:/usr/bin# echo mem > /sys/power/state Following is the screen shot shows how the Host is entering suspend mode, also the wl1271 is suspended [16277.797393] PM: Syncing filesystems ... done. [16277.929870] PM: Preparing system for mem sleep [16277.934509] Freezing user space processes ... (elapsed 0.02 seconds) done. [16277.963470] Freezing remaining freezable tasks ... (elapsed 0.02 seconds) done. [16277.994689] PM: Entering mem sleep [16277.998565] Suspending console(s) (use no_console_suspend to debug) [16278.242462] PM: suspend of devices complete after 236.060 msecs [16278.243408] PM: late suspend of devices complete after 0.945 msecs [16279.748199] Successfully put all powerdomains to target state Resume the first EVM from Suspend by sending ping to it from the second EVM Following is the screen shot shows how the Host is resuming from suspend mode, also the wl1271 is reconnecting to the WiFi network (by the WPA supplicant) and traffic resumes. [16279.748840] PM: early resume of devices complete after 0.518 msecs [16279.749237] platform iva.0: omap_voltage_scale: Already at the requestedrate 800000000 [16279.749237] platform mpu.0: omap_voltage_scale: Already at the requestedrate 1000000000 [16280.107391] PM: resume of devices complete after 358.428 msecs [16280.157989] PM: Finishing wakeup. [16280.161499] Restarting tasks ... done. For more information on the commands we used: Enabling system for hitting retention during idle By default, the kernel will not try to hit retention or off while idle. To enable idle path to attempt deeper sleep states:
 * Two EVM's which are controlled via PC's with serial ports
 * One AP
 * Connect both stations (EVM) to the AP.
 * Enter the first EVM to suspend in WOWLAN mode.
 * Send ping to the first EVM from the Second EVM.
 * That ping will cause the first EVM to wake from suspend.
 * 1) echo 1 > /debug/pm_debug/sleep_while_idle

Enabling system for hitting OFF By default, retention is the deepest sleep state attempted. To enable powerdomain transitions to off mode
 * 1) echo 1 > /debug/pm_debug/enable_off_mode

After a suspend or after some idle time, use the powerdomain transition stats to check that transitions to off-mode are happening
 * 1) cat /debug/pm_debug/count

External Link
for more information use OMAP Power Management HOME