ST AN3433 APPLICATION NOTE

AN3433
Application note
Optimizing wakeup time and power consumption
in CR95HF and STRFNFCA devices

Introduction

This document describes several tips for application engineers to effectively manage CR95HF and STRFNFCA operating states and modes to define an adapted wakeup condition to return to its Active state to start communication with the external world in order to reduce power consumption.
The CR95HF and STRFNFCA have 2 main functional domains. In the first one, Active mode, the devices are able to communicate with a host using one of the serial interfaces (UART or SPI) or with RFID tags using its RF capabilities. In this mode, the device consumption is only a few milliamps, and when it emits RF signals, its field consumption becomes tens of milliamps. In the second domain, Wait for Event (WFE) mode, the device remains quiescent while waiting for an external event. In this mode, a very low level of power consumption (only a few microamps) may be achieved.
An application engineer is able to manage the wakeup conditions in order to adapt his strategy to optimize wakeup time or system power consumption.
This application note will provide guidelines for choosing the best implementation.
February 2012 Doc ID 019046 Rev 2 1/34
www.st.com
Contents AN3433
Contents
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1 Reference information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1 Reference documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2 Terms and acronyms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3 Notation conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2 Management of CR95HF or STRFNFCA activity . . . . . . . . . . . . . . . . . . . 6
2.1 Overview of operating modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2 Idle command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3 Idle command parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.4 Using LFO frequency setting to reduce power consumption . . . . . . . . . . 10
2.5 Optimizing wake-up conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.5.1 Wake-up source register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.6 Using various techniques to return to Ready state . . . . . . . . . . . . . . . . . 12
2.6.1 Default setting: from POR to Ready state . . . . . . . . . . . . . . . . . . . . . . . 12
2.6.2 From Ready state to Hibernate state and back to Ready state . . . . . . . 12
2.6.3 From Ready state to Sleep state and back to Ready state . . . . . . . . . . 12
2.7 Tag detection calibration procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3 Power consumption considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.1 Transition from Ready to Hibernate state . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.2 Transition from Ready to Sleep state . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.3 Wake-up by Tag Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Appendix A Tag detection principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
A.1 Tag detection sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Appendix B Tag Detection Calibration process. . . . . . . . . . . . . . . . . . . . . . . . . . 26
B.1 Tag Detection Calibration algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
B.2 Tag Detection calibration command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Appendix C Example of CR95HF tag detection calibration process . . . . . . . . . 29
2/34 Doc ID 019046 Rev 2
AN3433 Contents
Appendix D Example of CR95HF tag detection command using results of tag
detection calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Doc ID 019046 Rev 2 3/34
Reference information AN3433

1 Reference information

1.1 Reference documents

CR95HF: 13.56 MHz Multi-protocol Contactless Transceiver IC with SPI and UART serial access datasheet
STRFNFCA: Near field communication transceiver datasheet

1.2 Terms and acronyms

Table 1. List of terms and acronyms

Term Meaning
AFE Analog Front End
DAC Digital-to-analog converter
DFT Design for Test
NVM Non Volatile Memory
RFID Radio frequency identification
RFU Reserved for Future Use
WFE Wait For Event

1.3 Notation conventions

The following symbols correspond to:
>>>: Frame sent by the host to CR95HF or STRFNFCA
<<<: Frame sent by the CR95HF or STRFNFCA to the host
Table 2. List of characteristic values
Symbol Definition Value
CalRef
DacDataH High Level detection limit
DacDataL Low Level detection limit
MaxSleep Number of inactivity periods (t
SwingCnt Number of 13.56 MHz periods in the RF burst
t
DAC
t
HFO
t
INACTIVE
t
LFO
Tag Calibration Reference level and DAC threshold level for device setup
DAC set up time
Period of RF carrier (13.56 MHz) 73 ns
Inactivity period, delay between two wakeups for RF burst emissions in a Tag Detection sequence
Period of device Low frequency oscillator (32 kHz) 31.25 µs
INACTIVE
) before a timeout.
t
INACTIVE
(WuPeriod+1)*t
=
REF
4/34 Doc ID 019046 Rev 2
AN3433 Reference information
Table 2. List of characteristic values (continued)
Symbol Definition Value
t
OSC
t
REF
t
SWING
t
TO
WuPeriod
Oscillator set-up time
Reference time
RF Burst duration in Tag detection t
Timeout delay after which the device will automatically leave WFE mode.
Number of reference times (RT) in an inactivity period (t
INACTIVE
)
t
REF
= 256*t
SWING
t
TO
t
INACTIVE
= 8 ms
LFO
= Swing * t
= (MaxSleep) *
HFO
Doc ID 019046 Rev 2 5/34
Management of CR95HF or STRFNFCA activity AN3433

2 Management of CR95HF or STRFNFCA activity

2.1 Overview of operating modes

The CR95HF and STRFNFCA have 2 operating modes: Wait for Event (WFE) and Active. In Active mode, the device communicates actively with a tag or an external host (MCU). WFE mode includes four low consumption states: Power-up, Hibernate, Sleep and Tag Detector.
The CR95HF or STRFNFCA can switch from one mode to another.

Table 3. CR95HF or STRFNFCA operating modes and states

Mode State Description
This mode is accessible directly after POR.
Wait For Event (WFE)
Active
Power-up
Hibernate
Sleep
Tag D e t e c t o r
Power-up
Hibernate
Low level on IRQ_IN source. LFO (low-frequency oscillator) is running in this state.
Lowest power consumption state. The device has to be woken-up in order to communicate. Low level on IRQ_IN pin (longer than 10 µs) is the only wakeup source.
Low power consumption state. Wakeup source is configurable: –Timer –IRQ_IN – SPI_SS pin LFO (low-frequency oscillator) is running in this state.
Low power consumption state with tag detection. Wakeup source is configurable:
–Timer –IRQ_IN – SPI_SS – Tag detector LFO (low-frequency oscillator) is running in this state.
This mode is accessible directly after POR. Low level on IRQ_IN
source. LFO (low-frequency oscillator) is running in this state.
Lowest power consumption state. The device has to be woken-up in order to communicate. Low level on IRQ_IN the only wakeup source.
pin
pin
pin
pin (longer than 10 µs) is the only wakeup
pin (longer than 10 µs) is the only wakeup
pin (longer than 10 µs) is
Hibernate, Sleep and Tag Detector states can only be activated by a command from the external host (MCU). As soon as any of these three states are activated, the device can no longer communicate with the external host. It can only be woken up.
The behavior of the device in 'Tag Detector' state is defined by the Idle command.
6/34 Doc ID 019046 Rev 2
AN3433 Management of CR95HF or STRFNFCA activity

Figure 1. CR95HF or STRFNFCA initialization and operating state change

2.2 Idle command

The Idle command switches the device into WFE mode (low consumption) and defines the way it returns to Ready state.
In WFE mode, the device has two low consumption states: Hibernate and Sleep/Tag­Detector.
In Hibernate state, the device power consumption is extremely low (a few microamps) because most of its resources are switched off. When it receives an external event (pin IRQ_IN
In Sleep/Tag-Detector state, the device power consumption is low (tens of microamps) depending on the selected wakeup source. The wakeup source can be an internal timer, an external interrupt or the presence of a tag detected by the device.
In Tag-Detector state, after executing an initial Tag Detection Calibration procedure to set-up the device, the application engineer must adjust command parameters to select the best trade-off between the wakeup delay and the power budget.
), it will return to Ready mode in only a few milliseconds.
Doc ID 019046 Rev 2 7/34
Management of CR95HF or STRFNFCA activity AN3433
Table 4. Idle command description
Direction Data Comments Example
07 Command code Example of switch from Active
mode to Hibernate state:
>>>0x07 0E 08 04 00 04 00 18 00 00 00 00 00 00 00 00
Example of switch from Active to WFE mode (wakeup by low pulse on IRQ_IN
>>>0x07 0E 08 01 00 38 00 18 00 00 00 00 00 00 00 00
Example of switch from Active to WFE mode (wakeup by low pulse on SPI_SS
>>>0x07 0E 10 01 00 38 00 18 00 00 00 00 00 00 00 00
Example of wakeup by timeout
L
(7 seconds): Duration before Timeout = 256
* (WU period + 2) *
* t
L
(MaxSleep + 1)
L
>>>0x07 0E 01 21 00 38 00 18 00 60 60 00 00 00 00 08
Example of switch from Active to Tag Detector mode (wakeup by tag detection or low pulse on IRQ_IN
pin) (32 kHz, inactivity duration = 272 ms, DAC oscillator = 3 ms, Swing = 63 pulses of 13.56 MHz), 0A = Infinite sequence, 0B = Until TimeOut:
>>>0x07 0E 0A 21 00 79 01 18 00 20 60 60 64 74 3F 08
Example of a basic Idle command used during the Tag Detection Calibration process:
>>>0x07 0E 03 A1 00 F8 01 18 00 20 60 60 00 xx 3F 01
where xx is the DacDataH value.
pin):
pin):
Host to CR95HF or STRFNFCA
0E Length of data
<WU Source>
EnterCtrlL
EnterCtrlH
WUCtrlL
WUCtrlH
LeaveCtrlL
LeaveCtrlH
Specifies authorized wakeup sources and the LFO frequency
Settings to enter WFE mode
Settings to wake up from WFE mode
Settings to leave WFE mode (Default value = 0x1800)
Period of time between two tag
<WUPeriod>
detection bursts. Also used to specify the duration before timeout.
Defines the Wait time for HFO to
<OscStart>
stabilize: <OscStart> * t (Default value = 0x60)
Defines the Wait time for DAC to
<DacStart>
stabilize: <DacStart> * t (Default value = 0x60)
<DacDataL>
Lower compare value for tag detection
This value must be set to 0x00
(1)
.
during Tag Detection Calibration.
<DacDataH>
Higher compare value for tag detection
This is a variable used during
(1)
.
Tag Detection Calibration.
<SwingsCnt>
Number of swings HF during tag detection (Default value = 0x3F)
Max. number of tag detection trials before timeout
This value must be set to 0x01 during Tag Detection
<MaxSleep>
Calibration. Also used to specify duration
before timeout. MaxSleep must be:
0x00 < MaxSleep < 0x1F
(1)
.
8/34 Doc ID 019046 Rev 2
AN3433 Management of CR95HF or STRFNFCA activity
Table 4. Idle command description (continued)
Direction Data Comments Example
0x00 Result code This response is sent only
when CR95HF or STRFNFCA exits WFE mode.
<<<0x000101 Wakeup by timeout
<<<0x000102 Wakeup by tag detect
CR95HF or STRFNFCA to Host
0x01 Length of data
<Data> Data (Wakeup source)
<<<0x000108 Wakeup by
low pulse on IRQ_IN
CR95HF or STRFNFCA to Host
1. An initial calibration is necessary to determine DacDataL and DacDataH values required for leaving Tag Detector state. For more information, contact your ST sales office for the corresponding application note.
0x82 Error code
0x00 Length of data
<<<0x8200 Invalid command
length
pin

2.3 Idle command parameters

The Idle command (Host to device) has the following structure (all values are hexadecimal):

Table 5. Idle command structure

07 0E xx yy zz yy zz yy zz aa bb cc dd ee ff gg
Comma nd code
Data
length
WU
source
Enter
Control
WU
Control
Leave
Control
WU
Period
Osc
Start
DAC Start
DAC Data
Swing Count
Max
Sleep

Table 6. Summary of parameters

Parameter Description
Command code
Data length
This byte is the command code. ‘07’ represents the Idle command. This command switches the device from Active mode to WFE mode.
This byte is the length of the command in bytes. Its value depends on the following parameter values.
This byte defines the authorized wakeup sources in the wakeup source
WU Source
register. Predefined values are:
01: Time out 02: Tag Detection 08: Low pulse on IRQ_IN
These two bytes (EnterCtrlL and EnterCtrlH) define the resources when entering WFE mode.
Enter Control
0x0400: Hibernate 0x0100: Sleep (or 0x2100 if Timer source is enabled) 0xA100: Tag Detector Calibration 0x2100: Tag detection
These two bytes (WuCtrlL and WuCtrlH) define the wakeup resources.
WU Control
0x0400: Hibernate 0x3800: Sleep 0xF801: Tag Detector Calibration 0x7901: Tag detection
10: Low pulse on SPI_SS
Doc ID 019046 Rev 2 9/34
Management of CR95HF or STRFNFCA activity AN3433
Table 6. Summary of parameters (continued)
Parameter Description
These two bytes (LeaveCtrlL and LeaveCtrlH) define the resources when
Leave Control
WU Period
Osc Start
DAC Start
DAC Data
returning to Ready state.
0x1800: Hibernate 0x1800: Sleep 0x1800: Tag Detector Calibration 0x1800: Tag detection
This byte is the coefficient used to adjust the time allowed between two tag detections. Also used to specify the duration before timeout. (Typical value: 0x20)
Duration before Timeout = 256 * tL * (WU period + 2) * (MaxSleep + 1)
This byte defines the delay for HFO stabilization. (Recommended value: 0x60)
Defines the Wait time for HFO to stabilize: <OscStart> * t
This byte defines the delay for DAC stabilization. (Recommended value: 0x60)
Defines the Wait time for DAC to stabilize: <DacStart> * t
These two bytes (DacDataL and DacDataH) define the lower and higher comparator values, respectively. These values are determined by a calibration process.
When using the device demoboard, these values should be set to approximately 0x64 and 0x74, respectively.
L
L
Swing Count
Max Sleep
This byte defines the number of HF swings allowed during Tag Detection. (Recommended value: 0x3F)
This byte defines the maximum number of tag detection trials or the coefficient to adjust the maximum inactivity duration before timeout.
MaxSleep must be: 0x00 < MaxSleep < 0x1F This value must be set to 0x01 during the Tag Detection Calibration
process. Also used to specify duration before timeout. Duration before Timeout = 256 * t
(Typical value: 0x28)
* (WU period + 2) * (MaxSleep + 1)
L

2.4 Using LFO frequency setting to reduce power consumption

In WFE mode, the high frequency oscillator (HFO) is stopped and most processes being executed are clocked by the low frequency oscillator (LFO). To minimize CR95HF or STRFNFCA power consumption in WFE mode, the slower the LFO frequency, the lower the power consumption.
Example 1: Setting a lower LFO frequency
The following equation defines a basic timing reference:
t
= 256*tL ms (where tL = 1/f
REF
t
= 8 ms (when bits [7:6] are set to ‘00’, or 32 kHz)
REF
t
= 64 ms (when bits [7:6] are set to ‘11’, or 4 kHz)
REF
LFO
)
10/34 Doc ID 019046 Rev 2
AN3433 Management of CR95HF or STRFNFCA activity

2.5 Optimizing wakeup conditions

Using the Wakeup source register, it is possible to cumulate sources for a wakeup event. It is strongly recommended to always set an external event as a possible wakeup source.
To cumulate wakeup sources, simply set the corresponding bits in the wakeup source register. For example, to enable a wakeup when a tag is detected (bit 1 set to ‘1’) or on a low pulse on pin IRQ_IN

2.5.1 Wakeup source register

Wakeup conditions are defined in the 8-bit wakeup condition register. These bits select one or several external conditions to be evaluated by the device in order to exit Idle mode.
Bit 0: When set, the device will wake up and return to Ready state at the end of a predefined cycle. The Time Out (TO) value is defined by the Max sleep and Wake Up period:
TO = (MaxSleep *(WuPeriod+1)*RT or RT= 256*t
This bit must be set when using the timer as a possible wakeup source. It must be set during Tag Detection Calibration to force a wakeup after the first Tag Detection trial.
Bit 1: When set, the device will wake up when a Tag is detected in the RF field. This bit must also be set during Tag Detection Calibration or during Tag Detection (when the RF field is active).
(bit 3 set to ‘1’), set the register to 0x0A.
= 8 ms
LFO
Bit 2: This bit is RFU.
Bit 3: When set, the device will wake up when an external interrupt (low level on pin IRQ_IN
is detected. This is useful for SPI communications.
It is recommended to set this bit to ‘1’ in order to recover in the event of a system crash.
Bit 4: When set, the device will wake up when an external interrupt (low level on pin |SPI_SS
Bits [7:5] These bits are RFU.
) is detected. This is useful for UART communication.
Cumulation of wakeup conditions
The wakeup conditions selected in the Wakeup condition register can be cumulated.
When the device returns to Ready state, it is possible to use the RdReg command to read the Wakeup condition register to know which event caused the device to wake up from Idle mode.
Read Wakeup condition register: 08 03 62 01 00
Reply (‘xx’ represent the Wakeup condition register bits): 00 01 xx
This information is used after each iteration during the Tag Detection Calibration process to determine the CalRef level. This level corresponds to the switching of the bits in the Wakeup condition register from 0x02 (Tag Detector) to 0x01 (TimeOut) when using the device previously calibrated in a free-air environment (no tags present).
)
Doc ID 019046 Rev 2 11/34
Loading...
+ 23 hidden pages