NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.
OMAP Wireless COnnectivity NLCP Suspend Resume Operation
Contents
Suspend/Resume[edit]
Modes of Operation[edit]
Two mode of operation are supported by NLCP:
- Suspend state:
The wl1xxx 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 wl1xxx consumes minimal current consumption.
- WOWLAN state:
The host is shutting down but the WLAN chip is being kept active (WLAN enable pin remains active). This allows the wl12xx firmware to remain active during suspend and if the system is configured to allow the WLAN interrupt to wakeup the host, it can trigger a system resume when a specific packet is recived by the wl12xx firmware.
How to operate Suspend Resume[edit]
to enable the omap to enter sleep, low voltage, & low power perform the following:
mount -t debugfs debugfs /tmp
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 - Shutdown mode[edit]
- connect to AP with WPA supplicant
- get IP address from the AP
- send ping to the AP
- Enter Suspend mode
root@am335x-evm:~# echo mem > /sys/power/state
Following is the screen shot shows how the Host is entering suspend mode, also the wl1271 is suspended
root@am335x-evm:~# echo mem > /sys/power/state [ 2700.250152] PM: Syncing filesystems ... done. [ 2700.438964] Freezing user space processes ... (elapsed 0.01 seconds) done. [ 2700.459655] Freezing remaining freezable tasks ... (elapsed 0.01 seconds) don e. [ 2700.479644] Suspending console(s) (use no_console_suspend to debug) [ 2700.487701] wl12xx: down
- in order to resume from suspend, hit any key on the terminal, or touch the EVM screen
[ 2700.626983] PM: suspend of devices complete after 139.770 msecs [ 2700.628662] PM: late suspend of devices complete after 1.586 msecs [ 2702.417083] GFX domain entered low power state [ 2702.626098] PM: early resume of devices complete after 208.526 msecs [ 2702.919403] [ 2702.919403] CPSW phy found : id is : 0x4dd074 [ 2702.920989] PHY 0:01 not found [ 2702.924438] wl12xx: state: 0 [ 2703.337097] wl12xx: PHY firmware version: Rev 8.4.999.A2.129 [ 2703.376922] wl12xx: firmware booted (Rev 8.2.0.0.100) [ 2703.404998] PM: resume of devices complete after 778.269 msecs [ 2703.462646] Successfully transitioned all domains to low power state [ 2703.469451] Restarting tasks ... done. root@am335x-evm:~# [ 2705.917572] PHY: 0:00 - Link is Up - 100/Full [ 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.
- at that point the Station had reconnectd to the AP, and Ping should resume
Suspend/Resume - WOWLAN Wake on WLAN) mode[edit]
Comment: With current AM335x EVM, the Suspend resume in WOWLAN mode will not work due to HW limitations, wiki page with the needed rework will be ready soon, following description assumes a board that does not have the HW limitation.
The HW limitation is using the proper IRQ line that can wake up the Host from suspend, and use proper GPIO for the WLAN Enable signal that does not loose its context while suspend mode.
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
- Serial console activity or other configured wakeup sources (keypad, touchscreen) will trigger resume
- Send Magic frame from other Station to the Station that is in suspend mode
Suspend Resume Example - Wowlan mode[edit]
- Two EVM's which are controlled via PC's with serial ports
- One AP
the Procedure will be as followes:
- 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.
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 OFF
By default, retention is the deepest sleep state attempted. To enable powerdomain transitions to off mode
# echo 1 > /tmp_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
# cat /tmp_debug/count
External Link[edit]
for more information use OMAP Power Management