AM37x Wireless Connectivity Suspend Resume Operation

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

Mode of Operation
On Suspend state, the wl1271 chip will be held in shutdown mode, were the host disable the WLAN portion by keeping the WLAN_Enable signal OFF, in that mode the wl1271 consumes minimal current consumption.

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 To enter suspend mode: echo mem > /sys/power/state To Resume from suspend: Serial console activity or other configured wakeup sources (keypad, touchscreen) will trigger resume

Suspend Resume Example
Assuming that the station is already connected to AP and transfer data [ 3] 240.0-250.0 sec  23.6 MBytes  19.8 Mbits/sec [ 3] 250.0-260.0 sec  22.7 MBytes  19.0 Mbits/sec [ 3] 260.0-270.0 sec  23.0 MBytes  19.3 Mbits/sec [ 3] 270.0-280.0 sec  24.6 MBytes  20.6 Mbits/sec Enter Suspend mode 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 [ 9873.475219] PM: Syncing filesystems ... done. [ 9873.498291] PM: Preparing system for mem sleep [ 3] 280.0-290.0 sec  22.3 MBytes  18.7 Mbits/sec [ 9874.513397] Freezing user space processes ... (elapsed 0.01 seconds) done. [ 9874.539764] Freezing remaining freezable tasks ... (elapsed 0.02 seconds) done. [ 9874.570678] PM: Entering mem sleep [ 9874.575164] Suspending console(s) (use no_console_suspend to debug) [ 9874.584167] wl1271: down [ 9874.588775] wl1271: wl1271_suspend: wow_enabled: 0 [ 9874.819549] PM: suspend of devices complete after 235.900 msecs [ 9874.820892] PM: late suspend of devices complete after 1.342 msecs [ 9904.070861] Successfully put all powerdomains to target state Resume from Suspend (by hitting a key in the keyboard) 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. [ 9904.071746] PM: early resume of devices complete after 0.762 msecs [ 9904.072265] platform iva.0: omap_voltage_scale: Already at the requestedrate 520000000 [ 9904.072265] platform mpu.0: omap_voltage_scale: Already at the requestedrate 600000000 [ 9904.552398] wl1271: wl1271 resume [ 9905.089660] wl1271: firmware booted (Rev 6.1.5.50.69) [ 9905.134307] PM: resume of devices complete after 1062.438 msecs [ 9905.202453] PM: Finishing wakeup. [ 9905.223297] wlan0: deauthenticated from e0:91:f5:ea:9e:ee (Reason: 7) [ 9905.360504] cfg80211: Calling CRDA to update world regulatory domain [ 9905.997711] wlan0: authenticate with e0:91:f5:ea:9e:ee (try 1) [ 9906.007141] wlan0: authenticated [ 9906.060241] wlan0: associate with e0:91:f5:ea:9e:ee (try 1) [ 9906.069732] wlan0: RX ReassocResp from e0:91:f5:ea:9e:ee (capab=0x411 status=0 aid=1) [ 9906.078033] wlan0: associated [ 9906.185882] wl1271: Association completed. [ 3] 320.0-330.0 sec  23.7 MBytes  19.9 Mbits/sec [ 3] 330.0-340.0 sec  25.2 MBytes  21.2 Mbits/sec [ 3] 340.0-350.0 sec  26.3 MBytes  22.0 Mbits/sec 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:
 * 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