STMicroelectronics STSW-ST25R011 User Manual
STMicroelectronics STSW-ST25R011 is an advanced firmware for the ST25R3916-DISCO board, which leverages the capabilities of the powerful ST25R3916 chip. This state-of-the-art device seamlessly combines the functionalities of a high-performance NFC universal device and an EMVCo reader, opening up a wide range of possibilities for contactless applications.
Advertisement
Advertisement
UM2513
User manual
Firmware for the ST25R3916-DISCO board
Introduction
This document describes the features of the STSW-ST25R011 firmware, developed to demonstrate the capabilities of the ST25R3916-DISCO board, based on the ST25R3916 device.
The ST25R3916 is a high-performance NFC universal device and EMVCo reader that can be controlled by a microcontroller through SPI or I 2 C interfaces.
This reader supports all standard NFC protocols to communicate with tags, smartphones or any other reader.
May 2019 UM2513 Rev 3
www.st.com
1
Contents
Contents
UM2513
List of acronyms and notational conventions . . . . . . . . . . . . . . . . . . . . 5
Representation of numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
ST25 Discovery motherboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
ST25R3916 Discovery antenna daughter board . . . . . . . . . . . . . . . . . . . 9
ST25R3916-DISCO demonstrations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Reader / Writer demonstration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11
Tag information screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Card emulation demonstration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Peer to peer demonstration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Automatic antenna tuning demonstration . . . . . . . . . . . . . . . . . . . . . . . . . 17
UM2513 Rev 3
UM2513
List of tables
List of tables
UM2513 Rev 3
3
List of figures
List of figures
UM2513
UM2513 Rev 3
UM2513
1
List of acronyms and notational conventions
List of acronyms and notational conventions
1.1 Acronyms
APB: Advanced peripheral bus
DPO: Dynamic power output
GUI: Graphical user interface
IEC: International electro-technical commission
ISO: International organization for standardization
MCU: Micro controller unit (microcontroller)
NFC: Near-field communication
RF: Radio frequency
RFID: Radio frequency identification
RISC: Reduced instruction set computer
RSSI: Received signal strength information
SPI: Serial peripheral interface
URI: Uniform resource identifier
URL: Uniform resource locator
USB: Universal serial bus
1.2 Representation of numbers
The following conventions and notations apply in this document unless otherwise stated:
• Binary numbers are represented by strings of 0 and 1 digits shown with the most significant bit (MSB) on the left, the least significant bit (LSB) on the right, and “0b” added at the beginning. Example: 0b11110101.
• Hexadecimal numbers are represented by using numbers 0 to 9 and characters A to F, and adding “0x” at the beginning. The most significant byte (MSB) is shown on the left and the least significant byte (LSB) on the right. Example: 0xF5.
• Decimal numbers are represented without any trailing character. Example: 245.
UM2513 Rev 3
20
Hardware overview UM2513
2.1 ST25R3916
The ST25R3916 is a high-performance NFC universal device and EMVCo reader for contactless applications.
It manages the RF communication with tags, smartphones and other readers, supporting:
• As a Reader, all standard NFC tag communication protocols:
– NFC Forum NFC-A, NFC-B, NFC-F and NFC-V
– ISO14443A
– ISO14443B
– FeliCa™
– ISO15693
• Card emulation as a NFC Forum Type 4A or Type 3 tag
• All NFC Forum Peer-to-peer modes:
– Initiator and target roles
– Passive and active modes
Other features of the ST25R3916 are:
• Stream modes to implement custom protocols
• Integrated capacitive sensing system for low power tag presence detection
• Integrated inductive sensing system for low power tag presence detection using phase or amplitude
• High output power
• User selectable and automatic gain control
• SPI up to 10 Mb/s
• I 2 C up to 3.4 Mb/s
2.2 STM32L476
The STM32L476xx devices are ultra-low-power microcontrollers based on the high-performance Arm
®(a)
Cortex
®
-M4 32-bit RISC core operating at a frequency of up to
80 MHz. The Cortex
®
-M4 core features a floating-point unit (FPU) single precision, which supports all Arm
®
single-precision data-processing instructions and data types. It also implements a full set of DSP instructions and a memory protection unit (MPU) that enhances application security.
a. Arm is a registered trademark of Arm Limited (or its subsidiaries) in the US and/or elsewhere.
UM2513 Rev 3
UM2513 Hardware overview
The STM32L476xx devices embed high-speed memories (Flash memory up to 1 Mbyte, up to 128 Kbytes of SRAM), a flexible external memory controller (FSMC) for static memories
(for devices with packages of 100 pins and more), a QuadSPI Flash memory interface
(available on all packages) and an extensive range of enhanced I/Os and peripherals connected to two APB buses, two AHB buses and a 32-bit multi-AHB bus matrix.
The STM32L476xx devices feature several protection mechanisms for embedded Flash memory and SRAM: readout protection, write protection, proprietary code readout protection and firewall.
The devices offer up to three fast 12-bit ADCs (5 Msps), two comparators, two operational amplifiers, two DAC channels, an internal voltage reference buffer, a low-power RTC, two general-purpose 32-bit timer, two 16-bit PWM timers dedicated to motor control, seven general-purpose 16-bit timers, and two 16-bit low-power timers. The devices support four digital filters for external sigma delta modulators (DFSDM).
In addition, up to 24 capacitive sensing channels are available. The devices also embed an integrated LCD driver 8x40 or 4x44, with internal step-up converter.
They also feature standard and advanced communication interfaces:
• three I
2
Cs
• three SPIs
• three USARTs, two UARTs and one Low-Power UART.
• two SAIs (Serial Audio Interfaces)
• one SDMMC
• one CAN
• one USB OTG full-speed
• one SWPMI (single-wire protocol master interface)
2.3.1
Note:
The ST25R3916-DISCO is a kit designed to evaluate the performance of the ST25R3916 reader. This kit is composed of two boards:
• ST25 Discovery motherboard, with the firmware (STSW-ST25R011) already flashed in
• ST25R3916 Discovery antenna daughter board
The ST25R3916-DISCO kit also provides two ST25TV02K tags.
ST25 Discovery motherboard
The ST25 Discovery motherboard is powered through one of the USB buses (micro and mini connectors), no external power supply is required.
The default setup of the ST25R3916-DISCO kit requires to power the ST25 Discovery motherboard through the USB-Micro port.
This motherboard embeds the STM32L476VG microcontroller and different peripherals:
• LCD display and touchscreen to interface with the user
• USB connectors to connect to a PC (mini-USB for the ST-LINK debugger and micro-USB available for the user application)
• Optional modules: Wi-Fi
® phone.
and Bluetooth
®
Low Energy (BLE) to connect with a smart
UM2513 Rev 3
20
Hardware overview UM2513
The connector on the right side of the board is dedicated to daughter boards based on ST25
NFC devices.
Figure 1. ST25 Discovery motherboard MB1396 (top view)
6:EXV67OLQN 67OLQN
DFWLYLW\/('
5HVHW
EXWWRQ
8VHU
EXWWRQ
8VHU/('
67OLQN86%
8VHU86%
/&'WRXFKVFUHHQ
([WHQVLRQ
FRQQHFWRUV
3RZHULQJ
RSWLRQV
:L)L
VWDWXV/(' :L)L
6:XSGDWH
3RZHU9/('
-R\VWLFN
:L)L
UHVHWEXWWRQ
1. Available only on demonstration edition.
7DJGHWHFWLRQ
RQJRLQJ
([WHQVLRQFRQQHFWRU
*3,2VHWWLQJ
069
UM2513 Rev 3
UM2513 Hardware overview
This board embeds the ST25R3916 NFC reader device and a 67 x 67 mm
2
, 13.56 MHz single layer copper etched antenna.
The ST25R3916 can communicate with the STM32L476VG 32-bit MCU via the SPI or I
2
C bus.
The board also features a switch to select the RF voltage (3.3 V or 5 V).
Figure 2. ST25 Discovery antenna daughter board (top view)
$QWHQQDDUHD
5)SRZHULQJVHOHFWLRQ
VZLWFKRU9
675 5)IURQWHQGDUHD &DSDFLWLYHVHQVLQJ
HOHFWURGHV
069
The ST25TV02K tags contactless interface is compatible with the ISO/IEC 15693 standard and with the NFC Forum Type 5 tag. These tags feature a digital signature used to prove the origin of the chip in cloning detection.
These tags embed a configurable EEPROM with 60-year data retention, and can be operated from a 13.56 MHz long-range RFID reader or from an NFC phone.
UM2513 Rev 3
20
ST25R3916-DISCO demonstrations UM2513
3.1 Prerequisite
To run the demonstrations described below it is required to have the following hardware:
• ST25R3916-DISCO kit (motherboard + antenna daughter board)
Make sure that the JP14 jumper on the ST25 Discovery motherboard is positioned as shown here .
• An USB Micro cable to connect to a PC, required for two purposes:
– Power supply
–
Control of the demonstrations from a PC when in USB mode, see Section 3.7
.
• Optionally USB mini cable to connect to a PC in order to make use of the ST-LINK to flash the program memory of the STM32L476 MCU.
• The Reader / Writer demonstration requires to have NFC tags, like the ones provided with the ST25R3916-DISCO kit.
Some demonstrations (Card emulation, Peer to peer) require another reader, such as:
• a smartphone with NFC feature
• a second ST25R3916-DISCO kit
On the software side, the following packages can be downloaded from www.st.com
:
• STSW-ST25R011: firmware for the ST25R3916-DISCO kit (binary and source code available)
• STSW-ST25R010: PC installer for the ST25R3916 Discovery GUI, used for USB mode.
The main menu is composed of four icons, intended to access sub-menus.
Figure 3. Main menu display
UM2513 Rev 3
UM2513 ST25R3916-DISCO demonstrations
Each item allows the user to start the corresponding demonstration, as indicated below.
Demonstration
Table 1. Available demonstrations
Icon Reference
Reader / Writer
Card emulation
Peer to peer
Automatic antenna tuning
3.3
To start a demonstration, touch the screen on one demonstration icon. A long touch on an icon will display, in the top line, the name of the corresponding demonstration.
In any demonstration it is possible to go back to the previous screen by touching the bottom line of the screen, which usually displays the message: “Touch here to exit”.
Reader / Writer demonstration
As shown in
Figure 4 , this demonstration starts with the Tag detection screen, proposing two
types of detection (touch the screen to select the detection mode):
• Continuous polling (default), which continuously executes the NFC Forum tag detection algorithm. In this mode, the led LD2 on the ST25 Discovery motherboard blinks as the
RF field is periodically turned ON/OFF.
• Wake-up, which enables to detect the presence of a tag while the RF field is OFF thanks to the ST25R3916 inductive sensing system. In this mode the led LD2 on the
ST25 Discovery motherboard is OFF until a tag is detected.
UM2513 Rev 3
20
ST25R3916-DISCO demonstrations
Figure 4. Tag detection screen
UM2513
When the demonstration is in the tag detection screen, any tag placed above the antenna
will be inventoried and displayed on the screen with basic information ( Figure 5
):
• the NFC protocol supported by the tag
• the first 4 bytes of the tag UID.
Up to four tags can be displayed on the LCD.
Different colors are used to display the tag, depending on the supported communication protocol:
• blue for NFC-A
• green for NFC-B
• brown for NFC-F
• red for NFC-V
The user can continue the demonstration by touching the area used to display a tag, this will open the information screen for the selected tag.
Figure 5. Tag inventory screen
UM2513 Rev 3
UM2513
3.3.3
Note:
ST25R3916-DISCO demonstrations
Tag information screen
The tag information screen displays more information on the selected tag (see Figure 6
):
• the type of the tag.
• its complete UID.
• the communication speed for reception / transmission.
• the RSSI displayed as a bar which enlarges as the signal strength increase. RSSI is measured by regularly reading data from the tag.
• the DPO profile, displayed in the top right box. Only two DPO profiles are defined for this demonstration:
– full power: maximum RF power delivered, when the tag is far from the antenna
– low power: RF power is divided by approximatively 4, when the tag is near the antenna.
The DPO profile is automatically selected depending upon the distance between the tag and the reader.
• If the selected tag has a valid TruST25 signature (making it possible to authenticate a tag), the valid icon is also displayed on the screen (see
The display is regularly refreshed to display measured RSSI and resulting DPO values, moving the tag in front of the antenna will thus be immediately reflected on the display.
Some tags advertise a very long transmission timeout to the reader. Consequently, if the tag goes out of the field, the GUI may seem to freeze waiting for the tag response timeout. In this situation it is possible to interrupt the running transfer by touching the screen (either the exit area, or any other area if the tag is back in the field).
Figure 6. Tag information screen
Figure 7. Tag information with TruST25 signature
UM2513 Rev 3
20
ST25R3916-DISCO demonstrations UM2513
By touching the gray NDEF tab from the Tag information screen, it will enter the NDEF demonstration screen. This demonstration makes it possible to read and write NDEF messages from / to the selected tag.
This demonstration first reads the data in the tag, and if this data is an NDEF message, displays it such as in
Figure 8 for an URI or Figure 9 for a vCard.
If the data is not an NDEF messages, only the first bytes of raw data are displayed (see
).
The NDEF message write icon is present only if the selected tag supports NDEF.
Touch it to write an NDEF URI message to the tag memory (http://www.st.com/st25r).
Figure 8. NDEF URI read
Figure 9. NDEF vCard read
Figure 10. No NDEF present
UM2513 Rev 3
UM2513 ST25R3916-DISCO demonstrations
Note:
This demonstration configures the ST25R3916 to act as a NFC Forum Type 4A card.
More card emulation options are available by using the STSW_ST25R010 PC software.
As shown below, the screen displays the message: “CE mode running”, and three icons:
When selected the ST25R3916 emulates an NDEF URI message.
When selected the ST25R3916 emulates an NDEF vCard message
(~ 8 Kbytes, including a picture).
• Enabled (colored) after the emulated card has received data from a smartphone or reader. When enabled, touch it to see the received data.
• Inactive (gray) before any data is received.
For this demonstration, the user can bring a smartphone with NFC enabled or a reader above the ST25R3916 antenna. An Android ® smartphone will natively read the emulated card content and open the corresponding application (a Web browser for the URL, a
Contact app for the vCard).
An iOS ® smartphone (iPhone Xs/Xr or newer), will natively read the emulated URI and open a web browser (Safari), other ones may require an NFC application like the ST25 NFCTap
(to be downloaded from the App Store).
To write the emulated card with an Android ® smartphone, the user has to install an application such as the ST25 NFCTap (available on the Play Store, referred to as
STSW-ST25001 on www.st.com
). In this demonstration, the maximum size of an NDEF to be written is set to 3 Kbytes.
Any reader supporting the NFC Forum Type 4 tag protocol can be used to write data to the card emulated by the ST25R3916. For instance, it is possible to use a second
ST25R3916-DISCO kit in Reader/Writer mode to write an URI (see Section 3.3.4
Figure 11. Card emulation demonstration
UM2513 Rev 3
20
ST25R3916-DISCO demonstrations
3.5 Peer to peer demonstration
UM2513
This demonstration configures the ST25R3916 in the different NFC Forum peer to peer modes:
• Initiator and target roles
• Active and passive modes
The ST25R3916 searches for a peer device before moving to next mode.
As shown below, the screen displays the message: “Wait connection…”, and three icons:
When selected the ST25R3916 will send an NDEF URI message to the peer device.
Note:
Note:
When selected the ST25R3916 will send an NDEF vCard message to the peer device (~ 8 Kbytes, including a picture).
• Enabled (colored) after the ST25R3916 has received data from a peer device (smartphone or reader). When enabled, touch it to see the received data.
• Inactive (gray) before any data is received.
Put an Android ® smartphone above the ST25R3916-DISCO kit antenna to natively connect in peer to peer mode.
The role and mode of the ST25R3916 is shown in
. The mode can be one among the following ones:
• Initiator
• Target (P): for passive target (waiting for the field)
• Target (A): for active target (enabling its RF field for communication)
Once connected to a peer device, the selected NDEF message is automatically sent.
If the peer device is an Android smartphone, it will natively open the corresponding application (a Web browser for the URI, or a Contact app for the vCard).
Alternatively another reader, with NFC Forum peer to peer support, can be used as peer device. For instance a second ST25R3916-DISCO kit, with peer to peer demonstration started, can be used for that purpose.
This demonstration only implements a limited support of the peer-to-peer mode, for a full support it is recommended to use the ST25R3916-DISCO PC GUI (see
If the peer device is in passive target mode, when it goes out of the field, the GUI may seem to freeze waiting for the peer device response timeout. In this situation it is possible to interrupt the running transfer by touching the screen (either the exit area, or other area if the peer device is back in the field).
UM2513 Rev 3
UM2513 ST25R3916-DISCO demonstrations
Figure 12. Peer to peer demonstration
Figure 13. Peer to peer connected as initiator
The ST25R3916 allows the user to control variable capacitances to perform a fine tuning of the antenna and to obtain the best setup in any environment. For the tuning, three variable capacitances are used, two (Cs) connected serially, the third one (Cp) in parallel to the antenna.
When entering the demonstration, the capacitances are set to their default values, and the corresponding antenna measurements (amplitude and phase) are displayed both by a needle on a gauge and numerically on the screen (see
).
Figure 14. Default antenna tuning
UM2513 Rev 3
20
ST25R3916-DISCO demonstrations UM2513
Touch the screen to run the automatic antenna tuning, thus improving its performance. New capacitances are displayed along with the updated antenna measurement.
The needle corresponding to the previous values (before tuning) is now displayed in gray, while the new antenna metrics are displayed by the blue needle and the message on the
Figure 15. Automatic antenna tuning done
Push the user button (blue) on the ST25 Discovery motherboard to reset the capacitances to their default values.
The user can also manually explore the result of different capacitance settings by touching the slide bars on the right and left side of the screen. The display is then immediately refreshed with new antenna measurements.
To enter USB mode the user must reset the motherboard while keeping the user button
(blue) pushed. The screen must be as shown in
. To leave this mode, another reset is required, while leaving the user button not pushed.
The USB mode is used to allow a PC to control the ST25R3916-DISCO kit through the
USB-micro connector present on the motherboard.
The user must first download and install the software STSW-ST25R010 (available on www.st.com
) on a PC, and then connect the ST25 Discovery board to it with the micro USB port. Then, it must ensure that the jumper JP14 on the ST25 Discovery motherboard is positioned on MCU_USB, as indicated in
In this mode the ST25R3916 Discovery GUI PC software has full control over the
ST25R3916-DISCO kit. Refer to the ST25R3916-DISCO reference graphical user interface user manual (UM2517) to learn about the demonstrations available with the ST25R3916
Discovery GUI.
UM2513 Rev 3
UM2513 ST25R3916-DISCO demonstrations
Figure 16. USB mode
UM2513 Rev 3
20
Revision history UM2513
Date
20-Dec-2018
22-Feb-2019
21-May-2019
Revision
Table 2. Document revision history
Changes
1
2
3
Initial release.
Document scope updated from ST Restricted to ST Public .
Updated
Section 3.6: Automatic antenna tuning demonstration .
Updated
Figure 2: ST25 Discovery antenna daughter board (top view)
,
Figure 11: Card emulation demonstration
and Figure 13: Peer to peer connected as initiator
.
UM2513 Rev 3
UM2513
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. For additional information about ST trademarks, please refer to www.st.com/trademarks .
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.
© 2019 STMicroelectronics – All rights reserved
UM2513 Rev 3 21/21
21
Download
Advertisement