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.

OMAP35x Wireless Connectivity Suspend Resume Application

From Texas Instruments Wiki
Jump to: navigation, search

Suspend Resume[edit]


How to enter into suspend Resume mode?[edit]

To mount the filesystem, execute these steps:

 
 mkdir /dbg
 mount -t debugfs debugfs /dbg


To allow/prevent the processor to enter idle states, execute these commands:

    • Please confirm the location of the variables it might be different.
 
   echo 1 > /dbg/pm_debug/sleep_while_idle
   echo 0 > /dbg/pm_debug/sleep_while_idle

To allow/ prevent transition to OFF mode:

 
  echo 1 > /dbg/pm_debug/enable_off_mode
  echo 0 > /dbg/pm_debug/enable_off_mode

To allow/prevent voltage to off while idle:

 echo 1 > /tmp/pm_debug/voltage_off_while_idle
 echo 0 > /tmp/pm_debug/voltage_off_while_idle 

The suspend for device can be asserted as follows:

 
 echo -n "mem" > /sys/power/state

To wakeup, press a key on the OMAP3EVM keypad; or tap any on the serial console.

How to define a packet filter which can be used to wake up the platform when a specific packet type is received from the WLAN?[edit]


Question: Please explain how to configure the driver for adding a suspend filter that can be used to wake up the platform from suspend mode when a specific packet is received from the WLAN interface
Answer: This feature is an enhancement of the “Packet Filtering” or WAKE ON LAN feature which is designed to block packets from going up from the firmware layer into the driver layer. Please refer to the following section for a description of the packet filtering feature: <How define Data filter>
The packet filtering feature solution supports activation of up to 4 filters. In this suspend filter implementation we are utilizing the last filter (Filter number 4) for a suspend mode filter. When the system is deciding to enter suspend mode, the active mode filters are removed from the firmware and the content of the forth filter (the suspend filter) is programmed to the firmware. When the system is in suspend mode, a packet which is received on the WLAN interface and matches the filter criteria would trigger a wakeup event to the platform. When the platform is coming out of the suspend mode, this filter is removed from the firmware and the active mode filters (if defined) are loaded to the firmware instead.



Configuring the suspend type (using tiwlan.ini)[edit]

The type of suspend can be configured using the following code added to the registry file tiwlan.ini See the below example which sets the suspend type to use the wakeup filter.

Key: SuspendAction optional values:

  • 0 - In Suspend mode the WLAN will disconnect from the WiFi network and will be in shutdown mode (perform Stop/Start WLAN driver)
  • 1 - In suspend mode the WLAN will continue to be connected to the WiFi network and keep listen to WiFi frames however will wake up the Host (Resume from Suspend) on receiving "magic" frame, the "magic" frame is defined by configuring a data filter.


Default value: SuspendAction = 1

Initializing active/suspend filters using the CLI[edit]

For the purpose of the configuration of the active/suspend filters the following commands have been added to the CLI: susPend-add (P): Initializes a packet filter which is used for waking up the board from suspend mode suspend-remoVe (V): Removes a previously defined suspend filter show-filTers (T): dumps the filter configuration to the screen. The output looks similar to the following example:

/ m v f t

TIWLAN: 3295.764956: index=0, Active filter - offset: 12 pattern: 0806 byte mask: 03
TIWLAN: 3295.772555: index=1, No Filter defined
TIWLAN: 3295.776858: index=2, No Filter defined
TIWLAN: 3295.781161: index=3, Suspend filter- offset: 12 pattern: 6666 byte mask: 03

In this example we are seeing two defined filters:
An active active filter which filters only ARP packets (Protocol Type = 0x806)

Destination MAC (Bytes 0-5) Source MAC (Bytes 6-11) Protocol Bytes (12:13) IP Protocol (Bytes 23-24) Source IP (Bytes 26-29) Destination IP (Bytes 30-33)
Mask 11
Data 0806

To define this filter the following CLI command should be used:

	/ m v f a 12 11 0806


A suspend filter which wakes the platform from suspend mode when a packet with a value of 0x6666 in the “Protocol Type” bytes

Destination MAC (Bytes 0-5) Source MAC (Bytes 6-11) Protocol Bytes (12:13) IP Protocol (Bytes 23-24) Source IP (Bytes 26-29) Destination IP (Bytes 30-33)
Mask 11
Data 6666

To define this filter the following CLI command should be used:

	/ m v f p 12 11 6666


Initializing active/suspend filters using the registry (tiwlan.ini)[edit]

The following section in the tiwlan.ini file can be used for achieving the same filters configuration as in the above CLI example. Filter 1 below is used for the ARP filer and filter 4 is used for the suspend filter. Note: Only filter number 4 can be used for the suspend filter.

#------------------------ RX data filters-------------------------------

#------- Active state filters (Example)------
RxDataFilters_Filter1Offset = 12
RxDataFilters_Filter1Pattern = 0806
RxDataFilters_Filter1Mask = 11

#------- Suspend state filters --------------
RxDataFilters_Filter4Offset = 12
RxDataFilters_Filter4Pattern = 66 66
RxDataFilters_Filter4Mask = 11


Limitation[edit]

  • The Linux Kernel will request to enter suspend mode however, suspend mode request can be rejected by the WLAN Driver in case it is in the middle of WLAN operation (such as transfer high throughput data). In that case it is up to the Application to request to enter suspend mode again since the Linux kernel will not request to enter to Suspend mode without direct request from the Application.
  • On Suspend mode were the WLAN stays connected to the WiFi network, the firmware may wake up the Host on any WiFi link events (like low link quality, Low RSSI etc.) that will wake up the host and resume from suspend, in that case the Linux kernel will not try to enter suspend mode again, and it is up to Application to request to get in Suspend mode again.
  • there is no support for suspend resume in case the file system is stored on the SD card. the suspend resume is working when storing the file system in the flush. the reason for that is due to an issue were in case of SD card removal in suspend mode, then the SD card content might be erased.



HomepageIcon.jpgHOME

E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article OMAP35x Wireless Connectivity Suspend Resume Application here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article OMAP35x Wireless Connectivity Suspend Resume Application here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article OMAP35x Wireless Connectivity Suspend Resume Application here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article OMAP35x Wireless Connectivity Suspend Resume Application here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article OMAP35x Wireless Connectivity Suspend Resume Application here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article OMAP35x Wireless Connectivity Suspend Resume Application here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article OMAP35x Wireless Connectivity Suspend Resume Application here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article OMAP35x Wireless Connectivity Suspend Resume Application here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article OMAP35x Wireless Connectivity Suspend Resume Application here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity