AN4696 Application note

Similar documents
AN4749 Application note

How to configure the BlueNRG-1 and BlueNRG-2 devices in network coprocessor mode. Main components Bluetooth Low Energy wireless system-on-chip

AN5123 Application note

AN4820 Application note

P-NUCLEO-USB001. STM32 Nucleo pack for USB Type-C and Power Delivery. Features. Description

AN4311 Application note

AN4515 Application note

P-NUCLEO-USB001. STM32 Nucleo pack for USB Type-C and Power Delivery Data brief. Features. Description

P-NUCLEO-IKA02A1. STM32 Nucleo pack: electrochemical toxic gas sensor expansion board with CO sensor. Description. Features

L9958 Evaluation board for high current (8.6A) DC and Stepper Motors. Description

STSW-BLUENRG1-DK. BlueNRG-1, BlueNRG-2 DK SW package

X-NUCLEO-53L0A1. Ranging and gesture detection sensor expansion board based on VL53L0X for STM32 Nucleo. Description. Features

X-NUCLEO-53L1A1. Long distance ranging Time-of-Flight sensor expansion board based on VL53L1X for STM32 Nucleo. Description.

ST25DV-DISCOVERY. Discovery kit for the ST25DV04K dynamic NFC/RFID tag. Features

USB Type-C and Power Delivery Nucleo pack with NUCLEO-F072RB expansion board based on STUSB1602. Description

UM2167 User manual. OrCAD PSpice model usage instructions

Motor control power board based on the SLLIMM-nano 2 nd series

AN4045 Application note

AN4872 Application note

Description. July 2016 DocID Rev 2 1/6

NUCLEO-L433RC-P NUCLEO-L452RE-P

RN0084 Release note. ST-LINK/V2 firmware upgrade. About this release note

AN3281 Application note

STEVAL-IPMnM2N. Motor control power board based on the SLLIMM-nano 2 nd series. Description. Features. RoHS compliant

AN5224. STM32 DMAMUX: the DMA request router. Application note. Introduction

UM2092 User manual. Basic metrology firmware for the STM32F103RD and the STPM32 devices. Introduction

EV-VND7040AJ. VND7040AJ evaluation board. Features. Applications

Description. January 2019 DB2381 Rev 3 1/5

A scalable approach to your body, networking and security platforms. Description

EVALKITSTKNX. Miniature transceiver STKNX evaluation and development kit. Features

Software GUI user guide for STEVAL-ISV021V1, STEVAL- IDS002V1 and STEVAL-IDS003V1 evaluation boards

STSW-STWBCFWDT. STWBC firmware downloader tool. Description. Features

NUCLEO-L496ZG. STM32 Nucleo-144 board. Features. Description

UM1844 User manual. EVAL-L9958 Graphical user interface (GUI) Introduction

USB Type-C and Power Delivery Nucleo pack with NUCLEO-F072RB expansion board based on the STUSB1602

Getting started with X-NUCLEO-53L1A1 long distance ranging ToF sensor expansion board based on VL53L1X for STM32 Nucleo

AN4491 Application note

300 ma triple DC-DC converter for powering AMOLED displays. Description. Table 1: Device summary Negative voltage. Auxiliary positive voltage

Table 1: Device summary Part numbers Device info (stored in register 0xF0 and 0xF1) Comment SPIRIT1QTR 0x0130 Cut 3.0

Dynamic Electro-Thermal simulator for VIPower products. Description

EV-AUTO-LDOS. L5150GJ-L5300AH7-L4995AK Evaluation Board. Applications. Features. Description

Getting started with X-NUCLEO-IHM06A1 low voltage stepper motor driver expansion board based on STSPIN220 for STM32 Nucleo

P-NUCLEO-53L0A1. VL53L0X Nucleo pack with ranging, gesture detection sensor expansion board and STM32F401RE. Description. Features

Getting started with the STM32 Nucleo pack for USB Type-C and Power Delivery with the Nucleo-F072RB board and the STUSB1602

P-NUCLEO-53L1A1. VL53L1X nucleo pack with X-NUCLEO-53L1A1 expansion board and STM32F401RE nucleo board. Description. Features

SPC584Cx, SPC58ECx. 32-bit Power Architecture microcontroller for automotive ASIL-B applications. Features

AN4113 Application note

EV-VNH7040AY. VNH7040AY Evaluation Board. Features. Description

STEVAL-PCC010V1. ST802RT1A Ethernet PHY demonstration board with STM32F107 controller add-on board. Features. Description

Getting started with MotionPM real-time pedometer library in X CUBE-MEMS1 expansion for STM32Cube

STSW-BNRGUI. BlueNRG GUI SW package. Data brief. Features. Description

External memory code execution on STM32F7x0 Value line and STM32H750 Value line MCUs

Getting started with STEVAL-IDB007V1 and STEVAL-IDB008V1 evaluation boards

UM2343 Application note

AN2202 Application note

STM32L4R9I-EVAL. Evaluation board with STM32L4R9AI MCU. Features

Using the GPIOs and interrupt controller to drive LEDs on STM8 Nucleo-64 boards

EMIF06-USD14F3. 6-line low capacitance IPAD for micro-sd card with EMI filtering and ESD protection. Applications. Description. Features.

STSW-BNRG-Mesh. Mesh over Bluetooth low energy. Features. Description. Applications

How to upgrade the firmware on the STEVAL-USBC2DP USB Type-C to DisplayPort adapter

EVLKSTCOMET10-1. STCOMET smart meter system-on-chip development kit. Features

UM2330 User manual. ST8500 boot. Introduction

X-NUCLEO-53L0A1 ranging and gesture detection sensor expansion board based on VL53L0X for STM32 Nucleo

TN1235 Technical note

Bluetooth low energy profiles for the X-CUBE-BLE1 expansion for STM32Cube. Description

UM2361. Getting started with the ST BlueNRG-Mesh ios application. User manual. Introduction

AN4624 Application note

AN2261 APPLICATION NOTE

STSW-L9960, STSW-L9960T Graphical User Interface (GUI) for EVAL-L9960 & EVAL-L9960T

UM0792 User manual. Demonstration firmware for the DMX-512 communication protocol transmitter based on the STM32F103Zx.

Getting started with the FP-IND-PLCWIFI1 function pack for PLC management via Wi-Fi

ST Payment Secure Solution Java Card platform with up to 100 Kbytes of user NVM for AMEX payment applications

P-NUCLEO-6180X2. Proximity, gesture, ambient light sensor expansion board based on VL6180X for STM32L053R8. Description. Features

EMIF06-HSD04F3. 6-line low capacitance IPAD for micro-sd card with EMI filtering and ESD protection. Features. Application.

STOD32W. 100 ma triple DC-DC converter for powering AMOLED displays. Applications. Features. Description

SPC58EHx,SPC58NHx. A scalable approach for high-end body, networking and security platforms for Automotive. Description. Features

UM2091 User manual. EVAL-L9301 Demo board Hardware documentation. Introduction

EVALKIT-VL6180X. VL6180X plug-in and STM32 F401RE Nucleo board explorer kit. Description. Features

EMIF06-HMC02F2. 6-line IPAD, EMI filter including ESD protection. Description. Features. Applications. Complies with the following standards

AN4777 Application note

ST21NFCB. Near field communication controller. Features. RF communications. Hardware features. Communication interfaces. Electrical characteristics

STM32SnippetsL0. STM32L0xx Snippets firmware package. Features. Description

UM2255 User manual. SPC58NG-DISP user manual. Introduction

Running a simple 6LowPAN network consisting of one receiver node and one or more sensor nodes in a Sub-1GHz RF band

UM2216 User manual. Getting started with MotionFA fitness activity library in X CUBE MEMS1 expansion for STM32Cube. Introduction

AN2781 Application note

Wi-Fi expansion board based on SPWF01SA module for STM32 Nucleo. Description

UM2194. Getting started with MotionAW activity recognition for wrist library in X-CUBE-MEMS1 expansion for STM32Cube. User manual.

AN2667 Application note

UM2119 User manual. Graphical user interface (GUI) for EVAL-L9907-H. Introduction

Getting started with the digital MEMS microphone expansion board based on MP34DT01-M for STM32 Nucleo

STM32H7x3I-EVAL. Evaluation board with STM32H7x3XI MCUs. Data brief. Features

STA bit single chip baseband controller for GPS and telematic applications. Features

STM3220G-SK/KEI. Keil starter kit for STM32F2 series microcontrollers (STM32F207IG MCU) Features. Description

STEVAL-LDO001V1. Quad high performance LDO evaluation board based on LDBL20, LDLN025, LD39130S and STLQ020. Applications. Description.

TN1234 Technical note

EVAL6494L. Demonstration board for L6494L gate driver. Description. Features

Getting started with MotionPM real-time pedometer library in X-CUBE-MEMS1 expansion for STM32Cube

UM2045 User manual. Getting started with the X-CUBE-NFC3 near field communication transceiver software expansion for STM32Cube.

UM2350. Getting started with MotionPW real-time pedometer for wrist library in X-CUBE-MEMS1 expansion for STM32Cube. User manual.

Transcription:

Application note SPWF01Sx power management options Introduction The purpose of this application note is to describe the power management options available on the SPWF01Sx Wi-Fi module [1]. It introduces the IEEE 802.11 power management operations and details its implementation for a WLAN device. STM32 power control modes are also detailed. The module's power states, along with the corresponding power consumption, are reported as the result of the combination of the WLAN device and the STM32 power states. Finally, some typical application use cases are presented. August 2017 DocID027853 Rev 1 1/18 www.st.com

Contents AN4696 Contents 1 IEEE 802.11 power management... 5 2 WLAN power states and power management... 6 3 STM32 power control... 7 4 Power related AT commands... 8 5 SPWF01Sx power states and scenarios... 11 6 SPWF01Sx power-up... 13 7 Glossary... 15 8 References... 16 9 Revision history... 17 2/18 DocID027853 Rev 1

List of tables List of tables Table 1: wifi_operational_mode configuration variable settings... 8 Table 2: wifi_listen_interval configuration variable settings... 8 Table 3: SPWF01Sx power modes... 11 Table 4: Glossary of terms... 15 Table 5: Document revision history... 17 DocID027853 Rev 1 3/18

List of figures List of figures AN4696 Figure 1: SPWF01Sx current consumption during initial phase... 9 Figure 2: SPWF01Sx current consumption using adaptive algorithm... 9 Figure 3: SPWF01Sx current consumption in power save mode... 11 Figure 4: SPWF01Sx current consumption after wake up from power save... 12 Figure 5: SPWF01Sx current consumption during access to deep low_power state... 13 Figure 6: SPWF01Sx current consumption during power-up... 13 Figure 7: SPWF01Sx current consumption during initialization, scan, authentication and association... 14 Figure 8: SPWF01Sx current consumption during switch from active to deep low-power mode... 14 4/18 DocID027853 Rev 1

IEEE 802.11 power management 1 IEEE 802.11 power management The power management of the Wi-Fi client is fully specified by the IEEE 802.11 protocol [2]. Briefly, the STA may be in one of two different power states: Awake: the STA is fully powered Doze: the STA is not able to transmit or receive and therefore it consumes very low power The power consumption associated with each power state depends on the specific implementation. The transitions between the two states are determined by the STA s power management modes, summarized as: Active mode (AM): the STA may receive 802.11 frames at any time and shall be in the awake state Power save (PS): the STA shall be in the doze state and shall enter the awake state to listen to selected beacon frames and to send PS-Poll frames to the AP if the AP has buffered pending frames for that STA (indicated by the TIM element in most recent beacon frame). An STA shall remain in its current power management mode until it informs the AP of a power management mode change via a frame exchange that includes an acknowledgment from the AP. The AP shall buffer frames addressed to the STA operating in a PS mode. These buffered frames shall be transmitted only at designated times. The complete handshake between the AP and the STA is described in [2]. DocID027853 Rev 1 5/18

WLAN power states and power management AN4696 2 WLAN power states and power management The WLAN device implements the IEEE 802.11 power management based on the following internal power states [4]: Standby: completely powered down Sleep: largely powered down. It operates from the low power sleep clock (32 khz) Active: partially or completely powered up depending on the following sub-states: Rx Idle: the device is listening to the medium, only part of the receiver is active while the transmit circuits are disabled Rx Active: the device is receiving a frame, the transmit circuits are disabled Tx Active: the device is transmitting a frame The WLAN device implements two different PS modes: Legacy PS mode: the WLAN is in PS mode as defined in [2]. Fast PS mode: the device is typically in PS mode. If the host has queued a packet or the device has detected pending data from AP by listening to beacons, the device will enter the AM mode. After an idle period specified by the host, if no traffic is detected, the device will revert to the PS mode. 6/18 DocID027853 Rev 1

STM32 power control 3 STM32 power control The STM32 supports the following power modes: Run: normal functioning of the microcontroller with no power saving features. Stop: when operating in stop mode, SRAM and register content are preserved. All I/O pins keep the same state as in run mode. The wakeup latency when exiting stop mode is the internal 8 MHz RC oscillator wakeup time (internal clock source) plus the voltage regulator wakeup time from low power mode. Standby: this mode allows the lowest power consumption. It is based on the ARM Cortex-M3 deep-sleep mode, with the voltage regulator disabled. When operating in standby mode SRAM and register content are lost except for registers in the backup domain and standby circuitry. All I/O pins are kept in high impedance. The wakeup latency when exiting standby mode is the same as in the reset phase Entering either stop or standby mode depends on the specific application requirements in terms of low-power consumption, startup time and available wakeup sources. The stop mode is typically used to minimize STM32 power consumption while maintaining the WLAN device active. The STM32 can easily switch from stop mode to the run mode upon reception of an interrupt from the WLAN device indicating that data or management frames are ready to be processed. The standby mode is the deepest power saving state. During standby the STM32 is not able to listen for the WLAN device interrupt. Once the standby state is entered, it can be awakened only via the wake-up pin or the RTC alarm. DocID027853 Rev 1 7/18

Power related AT commands AN4696 4 Power related AT commands The host can configure the WLAN device power strategy with the following AT commands: at+s.scfg=wifi_powersave,mode at+s.scfg=wifi_operational_mode,state The wifi_powersave configuration variable allows a choice between active (0), PS (1) or Fast-PS (2) modes. The wifi_operational_mode configuration variable allows users to select whether the WLAN device must use the doze (1) or quiescent (2) power-state when entering the sleep state during PS or Fast-PS mode. Mode Table 1: wifi_operational_mode configuration variable settings State 0 - Active, no PS is used 1 1 Use PS mode, doze when sleeping (default) 1 2 Use PS mode, quiescent when sleeping 2 1 Use Fast-PS mode, doze when sleeping 2 2 Use Fast-PS mode, quiescent when sleeping To define the behavior of the STA when in PS or Fast-PS mode, the following commands are used: at+s.scfg=wifi_beacon_wakeup,beacon at+s.scfg=wifi_listen_interval,interval The wifi_beacon_wakeup configuration variable is used to set the wakeup interval of the WLAN device (i.e. the number of beacons after which the WLAN must wake up to receive a beacon). Note that a beacon value greater than the DTIM value dispatched by the AP would cause the loss of multicast frames from the AP. Further details about TIM and DTIM management can be found in [2]. The wifi_listen_interval variable is used to set wake-up at fixed interval (0) as specified by the beacon value, or using a proprietary adaptive algorithm (1) to extend the wake-up, depending on the traffic. Beacon Interval Table 2: wifi_listen_interval configuration variable settings 0 0 Device will wake-up every DTIM interval (default) 0 1 Device will wake-up depending on the traffic within a maximum of DTIM interval X 0 Device will wake-up every X beacons X 1 Device will wake-up depending on the traffic within a maximum of X beacons The following figures illustrate the current consumption (x=500 ms/div, y=50 ma/div) of the WLAN module when using the proprietary adaptive algorithm to extend the wake-up period depending on the traffic (with an upper limit of 10 beacons). For the specific AP settings, DTIM occurs at every beacon, i.e. at every 100 ms. 8/18 DocID027853 Rev 1

Power related AT commands at+s.scfg=wifi_powersave,1 at+s.scfg=wifi_operational_mode,1 at+s.scfg=wifi_beacon_wakeup,10 at+s.scfg=wifi_listen_interval,1 During the initial phase, the STA wakes up at every beacon (x=100 ms/div, 50 ma/div). Figure 1: SPWF01Sx current consumption during initial phase After the initial period, the algorithm adapts the wake-up time to match the traffic while staying within the limit of 10 beacons interval set by the command (x=1s/div, y=50ma/div). Figure 2: SPWF01Sx current consumption using adaptive algorithm Apart from the AT commands used to manage the power-state of the WLAN device, two additional commands are provided to manage the power-states of the STM32. The following command can be used to allow the STM32 to enter the sleep mode (corresponding to the stop state): at+s.scfg=sleep_enabled,1 Once the Stop state is entered, the STM32 can be awakened by an interrupt from the WLAN device or by the wake-up pin. It must be noted that the STM32 can be switched on-the-fly from/to the Run state to/from the Stop state by remotely accessing the WLAN device from a browser: CGI engine DocID027853 Rev 1 9/18

Power related AT commands AN4696 To enter Stand-by mode for a pre-defined (by dedicated configuration variable) amount of time, the following command must be used: at+cfun=4 Where time is expressed in seconds. The STM32 will then enter the stand-by mode and will be awakened by the RTC alarm after some time. 10/18 DocID027853 Rev 1

SPWF01Sx power states and scenarios 5 SPWF01Sx power states and scenarios For module power consumption figures in the possible power states (i.e. Standby, Sleep, Power Save, Active Rx, Active Tx) refer to the module's datasheet. The following table summarizes the available power modes. Table 3: SPWF01Sx power modes Module power modes STM32 power states WLAN power states AT commands Standby Standby Standby at+s.scfg=standby_time,t at+s.scfg=sleep_enable,1 at+s.scfg=wifi_powersave,1 2 Sleep Stop PS or Fast PS at+s.scfg=wifi_operational_mode,1 2 at+s.scfg=wifi_beacon_wakeup,x at+s.scfg=wifi_listen_interval,0 1 at+s.scfg=sleep_enable,0 at+s.scfg=wifi_powersave,1 2 Power save Run PS or Fast PS at+s.scfg=wifi_operational_mode,1 2 at+s.scfg=wifi_beacon_wakeup,x at+s.scfg=wifi_listen_interval,0 1 Active Run Rx Idle Rx Active Tx Active at+s.scfg=sleep_enable,0 at+s.scfg=wifi_powersave,0 The figure below shows the current consumption of the WLAN device in PS mode during the reception of beacons. Figure 3: SPWF01Sx current consumption in power save mode The following figure details the startup timing when the WLAN device wakes up to receive a beacon. DocID027853 Rev 1 11/18

SPWF01Sx power states and scenarios Figure 4: SPWF01Sx current consumption after wake up from power save AN4696 The standby power state is suited for low duty-cycle application, where the WLAN device is required to wake up for a very short-time at specific time intervals (e.g. a few bytes transmission at every hour and then sleep). Sleep or power save states are suited for most of applications, including battery-operated devices. The active state is suited only for high-throughput or very responsive applications. 12/18 DocID027853 Rev 1

SPWF01Sx power-up 6 SPWF01Sx power-up The following figure (x=1 s/div, y=100 ma/div) illustrates the current consumption of the Wi- Fi module from reset until it enters a deep low-power state. Figure 5: SPWF01Sx current consumption during access to deep low_power state The process can be roughly divided into the following steps: 1. STM32 boot, WLAN power-up and FW upload (1.5 s) 2. WLAN initialization, scan, authentication, association (1.3 s) 3. TCP-IP power-up and DCPH IP address release (2.2 s) 4. Wi-Fi module transition from active to sleep mode (ranges from 1 s to 2 s) The WLAN is ready to operate after about 2.8 s while the IP address is released after 5 s. The Wi-Fi module can fully operate in deep low-power mode after around 7 s from the reset. Step 1 can be further detailed as illustrated in the figure below (x=200ms/div, y=50ma/div): Figure 6: SPWF01Sx current consumption during power-up Step 2 can be further detailed as in the figure shown below (x=200ms/div, y=100ma/div): DocID027853 Rev 1 13/18

SPWF01Sx power-up AN4696 Figure 7: SPWF01Sx current consumption during initialization, scan, authentication and association Transition from active to sleep mode is shown in the figure below (x=500 ms/div, y=50 ma/div): Figure 8: SPWF01Sx current consumption during switch from active to deep low-power mode 14/18 DocID027853 Rev 1

Glossary 7 Glossary Term AP RTC STA U-APSD WMM-PS Table 4: Glossary of terms Definition Access point Real-time clock Station Unscheduled automatic power save delivery Wi-Fi MultiMedia - power save DocID027853 Rev 1 15/18

References AN4696 8 References 1. SPWF01Sx Wi-Fi module http://www.st.com/wifimodules 2. IEEE Standard 802.11-2012. Part 11: Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications 3. Wi-Fi Multimedia Technical Specification 4 (with WMM-Power Save and WMM- Admission Control), Version 1.2.0, Wi-Fi Alliance Technical Committee, WMM - Admission Control Technical Task Group 4. CW1100 802.11n WLAN System on Chip, CW1100 Datasheet 5. RM0008 Reference manual STM32F103xx advanced ARM-based 32-bit MCUs 6. UM1695 - Command set reference guide for AT full stack for SPWF01Sx series of Wi-Fi modules, user manual of SPWF01Sx 16/18 DocID027853 Rev 1

Revision history 9 Revision history Table 5: Document revision history Date Revision Changes 01-Aug-2017 1 Initial release. DocID027853 Rev 1 17/18

IMPORTANT NOTICE PLEASE READ CAREFULLY STMicroelectronics NV and its subsidiaries ( ST ) reserve the right to make changes, corrections, enhancements, modifications, and improvements to ST products and/or to this document at any time without notice. Purchasers should obtain the latest relevant information on ST products before placing orders. ST products are sold pursuant to ST s terms and conditions of sale in place at the time of order acknowledgement. Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or the design of Purchasers products. No license, express or implied, to any intellectual property right is granted by ST herein. Resale of ST products with provisions different from the information set forth herein shall void any warranty granted by ST for such product. ST and the ST logo are trademarks of ST. All other product or service names are the property of their respective owners. Information in this document supersedes and replaces information previously supplied in any prior versions of this document. 2017 STMicroelectronics All rights reserved 18/18 DocID027853 Rev 1