UM1795 User manual. EVAL-ST95HF firmware functionalities. Introduction

Similar documents
M24LRxx/CR95HF application software installation guide

SPC5-FLASHER. Flash management tool for SPC56xx family. Description. Features

UM1676 User manual. Getting started with.net Micro Framework on the STM32F429 Discovery kit. Introduction

Single LNB supply and control IC DiSEqC 1.X compliant with EXTM based on the LNBH29 in a QFN16 (4x4) Description

AN3354 Application note

AN3332 Application note

AN3155 Application note

UM1613 User manual. 16-pin smartcard interface ST8034P demonstration board. Introduction

UM1727 User manual. Getting started with STM32 Nucleo board software development tools. Introduction

STEVAL-IEG001V2. Smart real-time vehicle tracking system. Features

UM1680 User manual. Getting started with STM32F429 Discovery software development tools. Introduction

UM1790 User manual. Getting started with STM32L053 discovery kit software development tools. Introduction

AN3998 Application note

AN4108 Application note

AN2680 Application note

EN: This Datasheet is presented by the m anufacturer. Please v isit our website for pricing and availability at ore.hu.

LM337. Three-terminal adjustable negative voltage regulators. Features. Description

AN2557 Application note

Table 1. Absolute maximum ratings (T amb = 25 C) Symbol Parameter Value Unit. ISO C = 330 pf, R = 330 Ω : Contact discharge Air discharge

Description. Table 1. Device summary. Order code Temperature range Package Packaging Marking

SPC5-CRYP-LIB. SPC5 Software Cryptography Library. Description. Features. SHA-512 Random engine based on DRBG-AES-128

AN3990 Application note

Description. Table 1. Device summary

STTH1R04-Y. Automotive ultrafast recovery diode. Features. Description

DDSL01. Secondary protection for DSL lines. Features. Description

UA741. General-purpose single operational amplifier. Features. Applications. Description. N DIP8 (plastic package)

Getting started with DfuSe USB device firmware upgrade STMicroelectronics extension

AN2389 Application note

TN0023 Technical note

AN3265 Application note

AN3353 Application note

UM0985 User manual. Developing your STM32VLDISCOVERY application using the IAR Embedded Workbench software. Introduction

Description. IO and RF AGC. ASIC controller and power management. Carrier recovery loop. GPIO switch matrix. Lock indicator and monitoring DVBS2 FEC

How To Write To An Eeprom Memory On A Flash Memory On An Iphone Or Ipro Memory On Microsoft Flash Memory (Eeprom) On A Microsoft Microsoft Powerbook (Ai) 2.2.2

AN2604 Application note

ST High voltage fast-switching NPN power transistor. Features. Applications. Description

AN2866 Application note

TDA W CAR RADIO AUDIO AMPLIFIER

BD238. Low voltage PNP power transistor. Features. Applications. Description. Low saturation voltage PNP transistor

BD241A BD241C. NPN power transistors. Features. Applications. Description. NPN transistors. Audio, general purpose switching and amplifier transistors

Figure 1. STM32F429 Discovery board: STM32F429I-DISCO

AN3110 Application note

2STBN15D100. Low voltage NPN power Darlington transistor. Features. Application. Description

AN2824 Application note

Description. Table 1. Device summary. Order codes. TO-220 (single gauge) TO-220 (double gauge) D²PAK (tape and reel) TO-220FP

EVL185W-LEDTV. 185 W power supply with PFC and standby supply for LED TV based on the L6564, L6599A and Viper27L. Features.

AN4156 Application note

AN4128 Application note

Description SO-8. series. Furthermore, in the 8-pin configuration Very low-dropout voltage (0.2 V typ.)

ESDLIN1524BJ. Transil, transient voltage surge suppressor diode for ESD protection. Features. Description SOD323

AN3359 Application note

ST19NP18-TPM-I2C. Trusted Platform Module (TPM) with I²C Interface. Features

AN3252 Application note

ULN2801A, ULN2802A, ULN2803A, ULN2804A

ETP01-xx21. Protection for Ethernet lines. Features. Description. Applications. Benefits. Complies with the following standards

ULN2001, ULN2002 ULN2003, ULN2004

BD135 - BD136 BD139 - BD140

UM0109 USER MANUAL. Public Transport Ticketing Demo

Order code Temperature range Package Packaging

DSL01-xxxSC5. Secondary protection for DSL lines. Features. Description. Applications. Benefits. Complies with the following standards

BZW50. Transil, transient voltage surge suppressor (TVS) Features. Description

AN3270 Application note

AN2760 Application note

AN4368 Application note

TDA2004R W stereo amplifier for car radio. Features. Description

MC Low noise quad operational amplifier. Features. Description

STDP2600. Advanced HDMI to DisplayPort (dual mode) converter. Features. Applications

AN3997 Application note

LM135-LM235-LM335. Precision temperature sensors. Features. Description

STDP2690. Advanced DisplayPort to DisplayPort (dual mode) converter. Features. Applications

STTH2R06. High efficiency ultrafast diode. Features. Description

STTH110. High voltage ultrafast rectifier. Description. Features

MC34063AB, MC34063AC, MC34063EB, MC34063EC

STP60NF06FP. N-channel 60V Ω - 30A TO-220FP STripFET II Power MOSFET. General features. Description. Internal schematic diagram.

STP60NF06. N-channel 60V Ω - 60A TO-220 STripFET II Power MOSFET. General features. Description. Internal schematic diagram.

P6KE. Transil, transient voltage surge suppressor (TVS) Features. Description. Complies with the following standards

LM134-LM234-LM334. Three terminal adjustable current sources. Features. Description

AN1754 APPLICATION NOTE

STN3NF06L. N-channel 60 V, 0.07 Ω, 4 A, SOT-223 STripFET II Power MOSFET. Features. Application. Description

TN0072 Technical note

AN3327 Application note

AN1819 APPLICATION NOTE Bad Block Management in Single Level Cell NAND Flash Memories

L6234. Three phase motor driver. Features. Description

L78MxxAB L78MxxAC. Precision 500 ma regulators. Features. Description

STDP4328. DisplayPort 1.2a concentrator. Features. Applications

AN3969 Application note

Obsolete Product(s) - Obsolete Product(s)

VN5R003H-E. 3 mω reverse battery protection switch. Features. Description. Application

UM1075 User manual. ST-LINK/V2 in-circuit debugger/programmer for STM8 and STM32. Introduction

UM0462 User manual. STM32 and STM8 Flash loader demonstrator. Introduction

AN974 APPLICATION NOTE

AN2146 APPLICATION NOTE

AN4646 Application note

32F072BDISCOVERY. Discovery kit for STM32F072xx microcontrollers. Features. Description

AN438 APPLICATION NOTE SAFETY PRECAUTIONS FOR DEVELOPMENT TOOL TRIAC + MICROCONTROLLER

STDP4320. DisplayPort 1.2a splitter. Features. Applications

UM0853 User manual. 1 Introduction. M24LRxx application software user guide

STM32F4DISCOVERY. Discovery kit with STM32F407VG MCU. Features. Description

Description. Table 1. Device summary. Order code Package Packing

AN2703 Application note

Transcription:

User manual EVAL-ST95HF firmware functionalities Introduction This document describes the firmware functionalities of the EVAL-ST95HF board (STSW-ST95HF001). It has the goal of helping the user to understand how this firmware works, by describing the main functionalities with simple examples. The ST95HF is an RFID transceiver. It supports ISO/IEC 14443A, ISO/IEC 14443B, ISO/IEC 15693 and ISO/IEC 18092 in reader mode (PCD). It also supports ISO/IEC 14443A in card emulation mode (PICC). The MCU of the EVAL-ST95HF is the STM32F103. The ST95HF, together with the microcontroller, emulates a PCD or a PICC. The MCU communicates with the ST95HF by SPI bus. The application is divided in three parts, one for PCD functions (read or write tags), one for PICC functions (tag emulation, file transfer) and one for peer to peer functions. The application has the capability to read and write TT1, TT2, TT3, TT4A, TT4B and vicinity card. It can also emulate TT2 and TT4A tags for the storage of NDEF messages. June 2014 DocID026602 Rev 1 1/19 www.st.com

Contents UM1795 Contents 1 Acronyms and notational conventions.......................... 5 1.1 Acronyms.................................................. 5 1.2 Representation of numbers.................................... 5 2 Overview.................................................. 6 2.1 ST95HF overview............................................ 6 2.2 STM32F103 overview........................................ 6 2.3 EVAL-ST95HF board......................................... 7 3 Firmware description........................................ 8 3.1 The main menu............................................. 8 3.2 Tag reader................................................. 9 3.2.1 Tag Hunting.............................................. 10 3.2.2 Tag reading.............................................. 10 3.2.3 PC link mode............................................. 11 3.3 Tag writer................................................. 12 3.4 Tag emulator............................................... 13 3.5 Card Emulator............................................. 14 3.5.1 File transfer.............................................. 14 3.6 Proprietary Peer to Peer...................................... 15 3.6.1 Initialization.............................................. 15 3.6.2 Description............................................... 16 3.6.3 How it works............................................. 17 4 Revision history........................................... 18 2/19 DocID026602 Rev 1

List of tables List of tables Table 1. Supported operation modes and functionalities.................................. 9 Table 2. Document revision history................................................. 18 DocID026602 Rev 1 3/19 3

List of figures UM1795 List of figures Figure 1. Functional block diagram................................................... 6 Figure 2. EVAL ST95HF board (front side)............................................. 7 Figure 3. EVAL ST95HF board (back side)............................................. 7 Figure 4. Main menu.............................................................. 8 Figure 5. Tag reader menu......................................................... 9 Figure 6. Example of tags found.................................................... 10 Figure 7. Reading tags............................................................ 11 Figure 8. Board linked to a PC...................................................... 12 Figure 9. Tag writer mode......................................................... 13 Figure 10. Emulator mode.......................................................... 14 Figure 11. File transfer............................................................. 15 Figure 12. P2P mode.............................................................. 16 Figure 13. Tennis game............................................................ 16 4/19 DocID026602 Rev 1

Acronyms and notational conventions 1 Acronyms and notational conventions 1.1 Acronyms APB: Advanced Peripheral Bus AAR: Android Application record CAN: Controller Area Network GPS: Global Positioning System IEC: International Electrotechnical Commission I²C: Inter-Integrated Circuit ISO: International Organization for Standardization MCU: Micro Controller Unit NFC: Near Field Communication RF: Radio Frequency RFID: Radio Frequency Identification RISC: Reduced Instruction Set Computer SPI: Serial Peripheral Interface USB: Universal Serial Bus 1.2 Representation of numbers The following conventions and notations apply in this document unless otherwise stated: Binary numbers Binary numbers are represented by strings of digits 0 and 1 shown with the most significant bit (MSB) on the left, the least significant bit (LSB) on the right, and a 0b added at the beginning. Example: 0b11110101. Hexadecimal numbers Hexadecimal numbers are represented by using the numbers 0 to 9 and the characters A F, and adding an 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 Decimal numbers are represented as is without any trailing character. Example: 245. DocID026602 Rev 1 5/19 18

Overview UM1795 2 Overview 2.1 ST95HF overview ST95HF is a transceiver for contactless application. It includes frame coding and RF modulation, thus allowing the connected MCU to send and receive NFC commands in the supported protocols. ST95HF is a slave device, hence an host (MCU) is required to control it. The ST95HF is connected to the MCU using an SPI communication. The ST95HF is able to act as a PCD or a PICC so it can interact with a tag or with a reader, as exemplified in Figure 1. Figure 1. Functional block diagram For more details concerning the ST95HF device, please refer to its datasheet. 2.2 STM32F103 overview The STM32F103xx incorporates the high-performance ARM Cortex -M3 32-bit RISC core operating at a 72 MHz frequency, high-speed embedded memories (Flash memory up to 1 Mbyte and SRAM up to 96 Kbytes), and an extensive range of enhanced I/Os and peripherals connected to two APB buses. All devices offer two 12-bit ADCs, three general purpose 16-bit timers plus one PWM timer, as well as standard and advanced communication interfaces: up to two I2Cs and SPIs, three USARTs, an USB and a CAN. These features make the STM32F103xx microcontrollers suitable for a wide range of applications such as motor drives, application control, medical and handheld equipment, PC and gaming peripherals, GPS platforms, industrial applications, PLCs, inverters, printers, scanners, alarm systems, video intercoms, and HVACs. 6/19 DocID026602 Rev 1

Overview 2.3 EVAL-ST95HF board The EVAL-ST95HF is a kit which allows to evaluate the ST95HF transceiver performance. The EVAL-ST95HF is powered through the USB bus and no external power supply is required. It includes a ST95HF, a 47x34 mm 13.56 MHz simple layer inductive etched antenna and its associated tuning components. By default, the ST95HF communicates with the STM32F103RG 32-bit MCU via the SPI bus. Pictures of the board are shown in Figure 2 and Figure 3. Figure 2. EVAL ST95HF board (front side) Figure 3. EVAL ST95HF board (back side) DocID026602 Rev 1 7/19 18

Firmware description UM1795 3 Firmware description Note: The ST95HF component can act both as a PCD or as a PICC. The main purpose of the firmware is to show all of these available functionalities. Accordingly, the menu is divided in three parts, one for PCD functions, one for PICC functions and the last one for Peer to Peer functions. In order to test the Peer to Peer mode it is necessary to have two ST95HF boards. All the other functions can be tested with an NFC phone, a tag or another ST95HF board. 3.1 The main menu The main menu is made up of icons allowing access to different sub menus. As can be seen from Figure 4, they are disposed in three lines in order to easily identify the active mode. Figure 4. Main menu The main functionalities associated with each operation mode are listed in Table 1. 8/19 DocID026602 Rev 1

Firmware description Table 1. Supported operation modes and functionalities Mode PCD PICC P2P Functionalities Tag reader: Tag hunting Tag reading PC link mode Tag writer: TEXT GEO... Tag Emulator: TT2 TT4A Card Emulator: File transfer Proprietary P2P: Proprietary P2P Auto Proprietary P2P Client Proprietary P2P Server To select a sub menu, move the black square on the icon of your choice using the joystick and press it to select the item. Every sub menu has a return option in order to return to the previous menu. Any menu or sub menu can be rotated using the rotate button, so that it will be possible to use the board in the other direction. In this case, the joystick too will be adapted (buttons reversed). It is not possible to rotate the screen when a mode is selected, this is feasible only inside a menu. 3.2 Tag reader In this menu there are three different modes, as can be seen from Figure 5. Figure 5. Tag reader menu DocID026602 Rev 1 9/19 18

Firmware description UM1795 3.2.1 Tag Hunting This mode is used to list all the found tags: when a tag is close enough to the antenna, the UID and the tag type is written on the screen (see Figure 6). Note: If the same tag is re-detected by the tag hunting it will refresh the line (this feature can help to check the detection range). Figure 6. Example of tags found 3.2.2 Tag reading This mode is used to read the NDEF content of a tag. When a tag is close enough to the antenna, its content is decoded and printed on the screen (see Figure 7). The reader is able to decode following NDEF messages: Empty URI SMS Email Geo position Text VCARD. The message can be formatted inside a smart poster in order to add an additional Text field to the message. 10/19 DocID026602 Rev 1

Firmware description Note: Note: Errors can be printed if there is a transmission error or an error during the decoding of a message. VCARD contains too much information to be printed on the screen, so only a message VCARD detected is shown, however all the decoding is done inside the program. The same tag is not read two times in a row. Figure 7. Reading tags 3.2.3 PC link mode This mode allows the EVAL-ST95HF to work like the CR95HF board and to be controlled using the CR95HF_Development_Software (see Figure 8). The computer interacts with the board using the USB cable. DocID026602 Rev 1 11/19 18

Firmware description UM1795 Figure 8. Board linked to a PC 3.3 Tag writer This mode is used to write an NDEF message to a tag, the first step here is to select the preformatted message to write. The right column corresponds to the size needed to write the message (an example is shown in Figure 9). Note: Note: Then the message can be written by putting the tag close to the antenna. Error messages can be written to the screen in the following cases: Not enough memory inside the tag: the message cannot be written because the tag inside the field is too small. Tag locked: the read or write access is not allowed. Transmission error: when the tag is removed before the end of write operation a transmission error is returned. The same tag cannot be written two times in a row. The firmware is able to format vicinity card if the tag does not contain any NDEF data but it will not try to format other tag types. 12/19 DocID026602 Rev 1

Firmware description Figure 9. Tag writer mode 3.4 Tag emulator In this menu (see Figure 10) it s possible to select the kind of tag (TT2 or TT4A) to be emulated and then default content can be chosen. The memory available is 492 bytes for the TT2, and 7998 bytes for the TT4A. These values can be changed inside the source code, it s worth noting that some smartphones do not support TT2 sizes over 1024 bytes. DocID026602 Rev 1 13/19 18

Firmware description UM1795 Figure 10. Emulator mode Note: Once the content is chosen, the emulation starts, and a PCD (e.g. a smartphone) can read the content as if it were a classic tag. It is also possible to read the content using another EVAL-ST95HF in reader mode. User can write content with the smartphone. When the emulation exits, the content of the tag is written inside the MCU flash, allowing it to be restored using the Previous content choice. If the board is powered off or reset during the emulation, the current content is lost because the content will be written to the flash only when the emulation is stopped. 3.5 Card Emulator 3.5.1 File transfer This mode is used to transfer a file from an NFC phone to the EVAL-ST95HF board (see Figure 11). In order to do that the phone must have the correct application which supports this proprietary transfer. When the board is configured in card emulator mode it is seen as a classic TT4A tag containing an AAR to the correct application. 14/19 DocID026602 Rev 1

Firmware description Figure 11. File transfer Note: Note: The progress bar will be refreshed during the transfer and at the end of the transfer a CRC will be calculated in order to check if the file is not corrupted. The elapsed time is written and the total size of the file sent. Doing this we can evaluate the speed to transfer a file using ST95HF. The result can change between two tries even with the same file and same smartphone as smartphone data bandwidth is unpredictable (multi task OS). The application on the EVAL-ST95HF will not try to interpret the data sent. 3.6 Proprietary Peer to Peer This is a proprietary peer to peer demonstration between two EVAL-ST95HF boards. It uses NFC-DEP functions but all data transferred are formatted using a proprietary way. 3.6.1 Initialization When the menu Peer to Peer is selected a choice between three different initializations is proposed (see Figure 12): Prop P2P Auto If this menu is selected the application will try to find automatically if it acts as the server (Initiator) or as the client (Target). In order to do that it starts with one random mode (Initiator/target) and try to find the other within a certain amount of time. If it cannot find another board it switches his mode and tries again. Prop P2P Client This menu is used to force the application to act as the client. It will wait infinitely for a server. Prop P2P Server This menu is used to force the application to act as the server. It will wait infinitely for a client. DocID026602 Rev 1 15/19 18

Firmware description UM1795 Figure 12. P2P mode 3.6.2 Description As can be seen from Figure 13, the application is a simple tennis game in order to show the peer to peer communication. When the initialization step is done, one board is defined as the initiator (Green racket) and the other as the target (Red racket). Figure 13. Tennis game The racket can be moved using the up and down buttons of each board. The goal is to avoid the ball (the white square) hitting the border of the screen. Every time a point is scored, the player s score is increased. When the score exceeds 9, it restarts from 0. 16/19 DocID026602 Rev 1

Firmware description The score can be displayed at the top or at the bottom of the screen by pressing the rotate button from any board. The information is transmitted to the other board using the peer to peer communication. The speed of the game can be reduced by pressing the right key of the initiator and increased by pressing the left key (by default it is set to the maximum speed). If the transmission is broken by spacing the two boards it will suspend the game and will restart in the same state when the communication will be reestablished. 3.6.3 How it works The server manage all the game, including moving the ball with bounces on walls or on rackets. It works like if the game had a 640x240 screen for the storage of the ball position. It also deals with the score calculation. The server is continuously sending data to the client containing the following information: Score2 Xmsb Xlsb Y ScreenRotated The Score2 byte contains the score for the client. It is send in order to be printed by the client on its screen. The Xmsb and Xlsb bytes are used to store the horizontal position of the ball. The client will print the ball on its screen only if the coordinate is between 320 and 640 (on its part of the global screen). The Y byte contains the vertical coordinate of the ball. It is used also in order to print the ball at the good position. The ScreenRotated field is used to know if the server's rotate button has been pressed or not. It toggles every time the button is pressed, so the other board can know if it has to update its own screen. The client answers to this frame by sending back two values:: Racket 2 Y ScreenRotated2 The Racket 2 Y stores the position of the client s racket. In fact the server needs it to compute bounces and to manage scores. The ScreenRotated2 works like the ScreenRotated parameter but this time it is for the client s rotate button. DocID026602 Rev 1 17/19 18

Revision history UM1795 4 Revision history Table 2. Document revision history Date Revision Changes 25-Jun-2014 1 Initial release. 18/19 DocID026602 Rev 1

Please Read Carefully: Information in this document is provided solely in connection with ST products. STMicroelectronics NV and its subsidiaries ( ST ) reserve the right to make changes, corrections, modifications or improvements, to this document, and the products and services described herein at any time, without notice. All ST products are sold pursuant to ST s terms and conditions of sale. Purchasers are solely responsible for the choice, selection and use of the ST products and services described herein, and ST assumes no liability whatsoever relating to the choice, selection or use of the ST products and services described herein. No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. If any part of this document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such third party products or services or any intellectual property contained therein. UNLESS OTHERWISE SET FORTH IN ST S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY WITH RESPECT TO THE USE AND/OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (AND THEIR EQUIVALENTS UNDER THE LAWS OF ANY JURISDICTION), OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. ST PRODUCTS ARE NOT DESIGNED OR AUTHORIZED FOR USE IN: (A) SAFETY CRITICAL APPLICATIONS SUCH AS LIFE SUPPORTING, ACTIVE IMPLANTED DEVICES OR SYSTEMS WITH PRODUCT FUNCTIONAL SAFETY REQUIREMENTS; (B) AERONAUTIC APPLICATIONS; (C) AUTOMOTIVE APPLICATIONS OR ENVIRONMENTS, AND/OR (D) AEROSPACE APPLICATIONS OR ENVIRONMENTS. WHERE ST PRODUCTS ARE NOT DESIGNED FOR SUCH USE, THE PURCHASER SHALL USE PRODUCTS AT PURCHASER S SOLE RISK, EVEN IF ST HAS BEEN INFORMED IN WRITING OF SUCH USAGE, UNLESS A PRODUCT IS EXPRESSLY DESIGNATED BY ST AS BEING INTENDED FOR AUTOMOTIVE, AUTOMOTIVE SAFETY OR MEDICAL INDUSTRY DOMAINS ACCORDING TO ST PRODUCT DESIGN SPECIFICATIONS. PRODUCTS FORMALLY ESCC, QML OR JAN QUALIFIED ARE DEEMED SUITABLE FOR USE IN AEROSPACE BY THE CORRESPONDING GOVERNMENTAL AGENCY. Resale of ST products with provisions different from the statements and/or technical features set forth in this document shall immediately void any warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever, any liability of ST. ST and the ST logo are trademarks or registered trademarks of ST in various countries. Information in this document supersedes and replaces all information previously supplied. The ST logo is a registered trademark of STMicroelectronics. All other names are the property of their respective owners. 2014 STMicroelectronics - All rights reserved STMicroelectronics group of companies Australia - Belgium - Brazil - Canada - China - Czech Republic - Finland - France - Germany - Hong Kong - India - Israel - Italy - Japan - Malaysia - Malta - Morocco - Philippines - Singapore - Spain - Sweden - Switzerland - United Kingdom - United States of America www.st.com DocID026602 Rev 1 19/19 19