Page 1
STSW-ST25DV002 firmware for the ST25DV64KC-DISCO board Introduction This document describes the functionalities of the STSW-ST25DV002 firmware, developed to take full advantage of the ST25DV64KC-DISCO board functionalities, working with any dynamic tag of the ST25DV-I2C Series. In this document, the dynamic tag series from STMicroelecronics is referred to as ST25DV-I2C tags.
UM2949 General information General information ® This document applies to the STM32L476xx Arm -based microcontroller devices. Note: Arm is a registered trademark of Arm Limited (or its subsidiaries) in the US and/or elsewhere. UM2949 - Rev 1 page 2/60...
UM2949 List of acronyms and notational conventions List of acronyms and notational conventions List of acronyms Table 1. Acronyms Acronym Definition Advanced peripheral bus ™ Android application record ® Bluetooth Low Energy Controller area network Global positioning system General purpose output Host to reader International electrotechnical commission International standards organization...
Two SAIs (serial audio interfaces) • One SDMMC • One CAN • One USB OTG full-speed • One SWPMI (single wire protocol master interface) For full details of the STM32L476xx microcontroller device specifications, refer to www.st.com. UM2949 - Rev 1 page 4/60...
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) ® •...
UM2949 ST25DV64KC-DISCO boards 3.3.2 ST25DV-I2C tag daughter board The ST25DVKC Discovery ANT C3 board (illustrated in Figure 3) embeds the ST25DV64KC device and a 40 mm x 23 mm, 13.56 MHz double layer inductive etched antenna (no need for any tuning components). The ST25DV64KC communicates with the STM32L476VG 32-bit MCU via the I²C bus.
ST25DV-I2C tag features, use CR95HF transceiver board firmware version 3.7.0 or higher, combined with the ST25PC-NFC software. Refer to Software toolbox for NFC tags user manual (UM2444), available on www.st.com. The ST25DV-I2C tag is fully compliant with the NFC Forum Type 5 standard. As this standard is recently introduced, some features may not be fully supported by older smart phones.
UM2949 Main menu To select a category, touch the icon on the screen. To start a demonstration, touch the desired demonstration icon on the screen (see description below). A long touch on an icon displays the description of the corresponding demonstration(s) in the top line.
UM2949 Main menu 4.2.2 RF GPO interrupt demonstration The ST25DV-I2C tag has a GPO that is used to send interrupts to the microcontroller. Several kinds of event on the RF side may be configured to trigger the GPO interrupt. In this demonstration all possible interrupt sources are enabled, except for the "RF activity", which occurs too often for reasonable readability when using a smart phone as a reader.
Click on GPO set or GPO reset to be able to drive the GPO line. For additional information about CR95HF PC software refer to the CR95HF development software user manual (UM1084), available on www.st.com. UM2949 - Rev 1 page 10/60...
UM2949 Main menu 4.2.3 ST25DV-I2C tag energy harvesting demonstration The ST25DV-I2C is able to harvest the energy provided by the RF to power other devices. This demonstration displays the voltage, current and power provided by the ST25DV-I2C (see Figure 10). Figure 10.
UM2949 Main menu 4.2.4 ST25DV-I2C tag states demonstration This menu illustrates the possibility to change the ST25DV-I2C tag state, for example the power save demonstration. This demonstration proposes three different modes: RF disabled mode: RF commands are interpreted but not executed. The ST25DV-I2C tag responds with the error code 0x0F.
UM2949 Main menu Figure 11. Smart phone and area display ST25PC-NFC software and multi areas The ST25PC-NFC software is used to create up to four areas on the ST25DV-I2C tag EEPROM: From the Inventory side panel, right-click on the ST25DV-I2C tag tag (see Figure In the contextual menu, select the "Multi Area Editor"...
UM2949 Main menu Figure 12. ST25DV-I2C tag multi area configuration interface of the ST25PC-NFC software Access rights for each area of the tag are set from the "Area configuration" screen (see Figure 13): From the table, select the area to protect (up to four areas). In the "Area protection"...
UM2949 Main menu 4.2.6 ST25DV-I2C tag compare EEPROM write This menu shows the difference between writing to the 4-byte ST25DVxxK EEPROM page and to the 16-byte ST25DVxxKC EEPROM page. When entering this menu the following screens show the difference by emulating an ST25DVxxKC EEPROM page write and performing the actual write on the ST25DVxxKC EEPROM.
UM2949 Main menu 4.2.7 NFC NDEF demonstration menu The NFC NDEF demonstrations menu (see Figure 18) proposes several demonstrations concerning NDEF messages: • URI NDEF message (URL and phone number) • SMS NDEF message • Email NDEF message • vCard NDEF message •...
UM2949 Main menu Figure 19. ST25DV64KC-DISCO read URI display Note: If the MCU reads the ST25DV-I2C tag memory, it does not contain a URI, an error message is displayed. Smart phone and URI NDEF Refer to Reading and writing NDEF on a smart phone with the Android ST25 application section.
UM2949 Main menu Figure 21. ST25DV64KC-DISCO read Email content display Note: If the MCU reads the ST25DV-I2C tag memory, it does not contain an e-mail, an error message is displayed. Smart phone and e-mail NDEF Refer to Reading and writing NDEF on a smart phone with the Android ST25 application section.
UM2949 Main menu Figure 22. ST25DV64KC-DISCO read vCard content display Smart phone and vCard NDEF Refer to Reading and writing NDEF on a smart phone with the Android ST25 application section. Geolocation demonstration The menu illustrated in Figure 23 indicates how to manage the geolocation content in the ST25DV-I2C tag. With the MCU, the user: •...
UM2949 Main menu MyApp record demonstration This demonstration illustrated by Figure 24 shows how to use a proprietary NDEF record to control an application running on the host MCU. As the format of the message follows the NFC Forum NDEF standard, it is written or read by any device supporting this format.
This menu indicates how to manage a Wi‑Fi pairing content in the ST25DV-I2C tag. By default, the ® ST25DV64KC-DISCO board does not feature the Wi‑Fi module. To access this feature add the ST SPWF01 ® module which acts as a mini Wi‑Fi access point.
UM2949 Main menu ® • Stores an NDEF message containing a Wi‑Fi protected setup (WPS) OOB descriptor. • Reads a WPS OOB previously stored in the ST25DV-I2C tag memory. ® When the user reads the ST25DV-I2C tag with a smart phone having the Wi‑Fi support, the smart phone ®...
UM2949 Main menu Figure 27. Smart phone and URL NDEF write menu display Reading and writing NDEF with the ST25PC-NFC software To access the NDEF editor screen, start by right-clicking on a ST25DV-I2C tag tag in the "Inventory Pane" (see Figure 8), then select the "NDEF Editor"...
UM2949 Main menu Figure 28. ST25PC-NFC software NDEF interface Clearing the EEPROM This menu allows the user to clear the EEPROM content. The three choices are: Write an empty NDEF Erase the CC file (replace the first four bytes of memory with 0xFF) Clear EEPROM (fill the whole memory with 0xFF).
UM2949 Main menu Figure 29. ST25DV64KC-DISCO Fast transfer mode display The picture and note icons in Figure 29, on the bottom left of the screen, point to a sub-menu that allows the user to choose a picture or a random data buffer, which is to be transferred to a reader (see Host to reader image upload Host to Reader data transfer...
The CR95HF is used as a RF reader, for more information refer to Software toolbox for NFC tags user manual (UM2444), available on www.st.com. To access the Fast transfer mode screen, start by right-clicking on a ST25DV-I2C tag tag in the "Inventory"...
UM2949 Main menu Figure 31. ST25PC-NFC software - ST25DV-I2C tag FTM interface Write tab Once the tag mailbox is filled , switch to the "Read message" tab (see Figure 32). Figure 32. ST25PC-NFC software - ST25DV-I2C tag FTM interface Read tab Click on the "Read Message Length"...
UM2949 Main menu • Reader-to-Host" firmware upgrade: transfer of binary file containing a new STM32 firmware from PC software (using CR95HF board) to ST25DV64KC-DISCO board, the ST25DV64KC-DISCO firmware is upgraded. • "Reader-to-Host" and "Host-to-Reader" image transfer: transfer of JPG image to/from PC software (using CR95HF board) to and from the ST25DV64KC-DISCO board, the image is displayed on ST25DV64KC- DISCO LCD.
UM2949 Main menu Figure 34. ST25DV drawer menu (Mailbox management, FTM demonstration, Stopwatch demonstration) As prerequisite to any data transfer, the mailbox has to be enabled, without any pending message. The correct status is shown in Figure UM2949 - Rev 1 page 31/60...
UM2949 Main menu Figure 36. Data transfers from reader to tag of a random buffer Note: According to data size selected, the corresponding payload data is initialized with random values on which a CRC is computed to be sure that the host computes the same data after each transfer. Note: For every transfers done with the Android™...
UM2949 Main menu Figure 37. Software R2H data transfer display A progress bar and a timer display the transfer progress. At the end of the transfer, the CRC calculated by the ST25DV64KC-DISCO board is compared with the CRC calculated by the PC software. Demonstration duration is displayed too. Reader to host firmware upgrade This function allows the user to send data (that is manipulated as binary) from the reader to the STM32L476xx microcontroller device.
UM2949 Main menu Figure 38. ST25DV64KC-DISCO firmware upgrade: password check If the password is correct, the user is authorized to start the transfer (Figure 39), if not, the user has to enter a new password to continue (Figure 40). Figure 39. ST25DV64KC-DISCO firmware upgrade: password OK Figure 40.
UM2949 Main menu Figure 41. Software end transfer status display When the transfer is successfully completed, the computed CRC and the transfer time are displayed (see Figure 42). In case of failure the display shows an error message. Figure 42. ST25DV64KC-DISCO firmware upgrade: transfer done To start the new firmware, simply tap the screen.
UM2949 Main menu Figure 43. Smart phone and firmware upgrade display PC software and firmware upgrade In the ST25DV-I2C tag/ST25DV-DISCOVERY "Demos" menu (see Figure 33), select the "FTM – Firmware Upgrade" item. To execute a R2H firmware upgrade, first select a binary file to send with the "Select File" button (see Figure 44).
UM2949 Main menu Figure 44. PC software R2H successful firmware upgrade Reader to host image download This function sends data from the reader to the STM32L476xx microcontroller device. In this demonstration, data is composed of jpeg images, stored in the Flash memory and displayed when the transfer is successful. To prepare the ST25DV64KC-DISCO for the R2H picture transfer demonstration, power on the board, then touch the FTM icon to start the fast transfer mode demonstration (see Figure...
UM2949 Main menu Click on “Send picture to tag” Select a picture in phone memory. The upload display screens are illustrated in Figure 45 and . Figure 45. Transfer from smart phone to tag UM2949 - Rev 1 page 39/60...
UM2949 Main menu Figure 46. Image transfer demonstration: send a picture PC software and image transfer In the ST25DV-I2C tag/ST25DV-DISCOVERY "Demos" menu (see Figure 33), select the "FTM – Picture Transfer" item. To run a R2H transfer (from CR95HF reader to Host board), first select the "Pick a picture to upload" item from the command list (see Figure 47).
UM2949 Main menu Figure 47. PC software R2H image transfer display Host to reader image upload This function sends data from the STM32L476xx microcontroller device to the reader (H2R). In this demonstration, the data is composed of jpeg images, it is written to the mailbox each time it is free, and the GPO returns the information to the MCU when the reader reads the mailbox message.
UM2949 Main menu Figure 48. ST25DV64KC-DISCO select picture to upload After selecting the picture to transfer, the firmware writes the first chunk in the mailbox and waits for the message to be read. During the transfer, a file size and a progress bar are displayed, as shown in Figure Figure 49.
UM2949 Main menu To return to the Fast transfer mode demonstration simply touch the screen. Smart phone and picture download transfer Features: same as Smart phone and picture transfers. Picture download steps: Check MB registers Select “FTM demos” in the drawer menu Received picture from tag button.
UM2949 Main menu To initiate the transfer, choose a picture from the ST25DV64KC-DISCO board. Then click on the "Start" button to start the transfer from the board to the reader. CRC computation is done when all data is transferred, then it is sent to the tag.
UM2949 Main menu Figure 53. ST25DV64KC-DISCO select H2R data size to transfer display The kit is now waiting for a reader to read the message on the mailbox (see Smart phone and H2R data transfer section) to continue the demonstration. When transfer is successfully completed, the display shows the computed CRC and transfer time (see Figure 50).
UM2949 Main menu Figure 54. Smart phone and data transfers H2R with selected size PC software and H2R data transfer In the ST25DV-I2C tag/ST25DV-DISCOVERY "Demos" menu (see Figure 33), select the "FTM – Picture Transfer" item. To send data from the ST25DV64KC-DISCO board to the HF reader, select "Receive a buffer in a file" in the command menu.
UM2949 Main menu Figure 55. PC software H2R data transfer display The demonstration ends when the PC software receives acknowledgment and saves the data in a file. A window pops up at the end of the transfer to select the file location. Stopwatch demonstration This demonstration shows how fast a smart phone updates the mailbox.
UM2949 Main menu Figure 56. ST25DV64KC-DISCO stopwatch start Smart phone and stopwatch transfers In this demonstration the smart phone sends, as fast as possible, stopwatch values (8-byte frames) to the MCU using the mailbox. The main features are • Configuration of the “Mail Box” register [Enable / Disable MB, Watchdog) –...
UM2949 Main menu Figure 57. Smart phone and stopwatch transfers PC software and stopwatch demonstration In the ST25DV-I2C tag/ST25DV-DISCOVERY "Demos" menu (see Figure 33), select the "FTM – Picture Transfer" item. Click on the "Start" button to begin sending time data to the board. Click on "Pause"...
UM2949 FTM protocol details Appendix A FTM protocol details Introduction The new FTM protocol has been introduced to bring the following benefits: ™ ™ • Protocol is integrated into the ST25SDK so that every application, whether on Android , iOS , or PC, can use it.
UM2949 Low-level protocol Low-level protocol A low-level protocol has been defined to: • Split the data to be sent into packets (a small header is added to indicate the content of the packet) • Ensure their transmission • Possibly: check the validity of the data received and acknowledge it This protocol allows user to send data of any size, both ways.
UM2949 ST Light Protocol Bit number Description • Bits used to indicate data split on several packets. They have the following meaning: – b00: Data fitting in a single packet. – b01: First packet of a serie of packets. In that case, a total length field (on 4 bytes) is present. It Bit 3 - 2 indicates the length of the data that has been split on several packets.
UM2949 ST Light Protocol • Then there is a command status: – CMD_OK (=0x81) in case of success – CMD_ERROR (=0x82) in case of error – CMD_INTERNAL_ERROR (=0x83) in case of internal error (not due to the protocol). – CMD_UNKNOWN (= 0x84) –...
Page 57
UM2949 List of tables List of tables Table 1. Acronyms ............... . . 3 Table 2.
Page 58
UM2949 List of figures List of figures Figure 1. Communication scheme ............. 4 Figure 2.
Page 59
UM2949 List of figures Figure 54. Smart phone and data transfers H2R with selected size ........46 Figure 55.
Page 60
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’...
Need help?
Do you have a question about the STSW-ST25DV002 and is the answer not in the manual?
Questions and answers