SLOA208B November   2014  – March 2019 TRF7970A , TRF7970A

 

  1.   NFC card emulation using the TRF7970A
    1.     Trademarks
    2.     Terms, Definitions, and Symbols
    3. Introduction
    4. Card Emulation
      1. 2.1 Anticollision
        1. 2.1.1 Card Emulation Type A
        2. 2.1.2 Card Emulation Type B
      2. 2.2 Data Exchange
    5. Configuration and Commands for Type 4 Tag Platforms
      1. 3.1 Overview of Type 4 Tag Configuration
        1. 3.1.1 Tag
        2. 3.1.2 Applications
        3. 3.1.3 Files
      2. 3.2 Firmware Structure
        1.       Example 1. Type 4 Tag Structures Within Example Firmware
        2. 3.2.1 tType4AppDS
        3. 3.2.2 tType4App
        4. 3.2.3 tType4File
        5. 3.2.4 Example Setup
          1.        Example 2. Example Setup of a Type 4 Tag Structure
      3. 3.3 File Structure
        1. 3.3.1 Capability Container
          1.        Example 3. Format of the Capability Container for a Tag With Two Files
        2. 3.3.2 Text RTD
          1.        Example 4. Example of a Text RTD Within an NDEF File
        3. 3.3.3 URI RTD
          1.        Example 5. Example of a URI RTD Within a Proprietary File
        4. 3.3.4 Smart Poster
        5. 3.3.5 V-Card
        6. 3.3.6 MIME
      4. 3.4 Available Type 4 Tag Commands
        1. 3.4.1 Frame Format
        2. 3.4.2 Select
        3. 3.4.3 Read Binary
        4. 3.4.4 Update Binary
      5. 3.5 Modifying Stored Tag Information
    6. Hardware Description
      1. 4.1 LaunchPad™ Development Kit and BoosterPack™ Plug-in Module Setup
        1. 4.1.1 BoosterPack Plug-in Module: DLP-7970ABP
        2. 4.1.2 LaunchPad Development Kit: MSP-EXP430F5529LP
        3. 4.1.3 LaunchPad Development Kit: MSP-EXP432P401R
      2. 4.2 Bundle Available for Purchase
    7. Card Emulation Firmware Example
      1. 5.1 Card Emulation APIs
      2. 5.2 Implementing a Card Emulation Sample Application
        1. 5.2.1 Low-Level Initialization
          1.        Example 6. MCU and TRF7970A Initialization Code Snippet
        2. 5.2.2 Card Emulation NFC Stack Setup
          1.        Example 7. Card Emulation Initialization Code
        3. 5.2.3 Emulation of Different RTDs
    8. Quick Start Guide
    9. Operational Overview
    10. Card Emulation Interoperability Results
    11. Conclusion
    12. 10 References
  2.   Revision History

Capability Container

In order for an NFC device to read or write the data of the emulated tag it needs to fetch the Capability Container (CC) file. The CC contains information such as the file IDs of all the other files included within the application and the read/write privileges of each file. It also contains the maximum data size for each file to determine how many bytes of space are available for writing. To get that information, the reader/writer needs to access the NDEF or Proprietary File Control Type Length Value (TLV). The File Control TLV must be included for every file within the CC to be accessed by an NFC compliant device.

The format for the Capability Container is specified in the NFC Forum Type 4 Tag Operation Specification 3.0.

  1. CC Length – This 2 byte value is determined by the number of different files contained within the tag. The formula to calculate the CC Length is: [7 + (#Files * 8)].
  2. Mapping Version – This value tells the reader the mapping specification used by the tag. The firmware provided supports Version 2.0.
  3. MLe – These 2 bytes indicate the maximum number of bytes that can be read from the tag by a single Read Binary command. For the provided firmware, this value should be set to 0xFB to maximize the amount of data that can be read. That value accounts for the first three data bytes sent in a Read Binary command, including the optional CID.
  4. MLc – These 2 bytes indicate the maximum number of bytes that can be written to the tag by a single Update Binary command. For the provided firmware, this value should be set to 0xF9 to maximize the amount of data that can be written. That value accounts for the first six data bytes sent in an Update Binary command, including the optional CID.
  5. File Control TLV – The TLV blocks provide the reader with information about the tag data.
    1. Type Field (T) – This field contains the file type information of the TLV block. The following values may be used:
      1. 0x04 – NDEF File
      2. 0x05 – Proprietary File
      3. 0x06 – Extended NDEF file
    2. Length Field (L) – This field contains the length of the value field of the TLV block
    3. Value Field (V) – This field contains the file ID, the maximum file size, and the read/write access conditions of the file.
      1. File ID – Each file within the tag should have its own unique file ID number.
      2. Max File Size – This value is not the size of the data itself, but the size of the maximum possible data that can be stored within the file.
      3. Read Access (R) – Determines the read access properties of the file. This should be set to 0x00 to ensure the file has full read access. All other values are for limited read access.
      4. Write Access (W) – Determines the write access properties of the file. This value must be set so that the write privileges of the CC matches the write privileges specified by bReadOnly flag of the file. The value 0x00 allows for full write privileges. The value 0xFF disables all write privileges and makes the file read-only. All other values are for limited write access.

There must be a File Control TLV for each different file contained within the tag. Therefore, if there are three different files, there must be three TLVs that correspond to the settings of each file.