nRF5 SDK v15.3.0
NFC Type 2 Tag

Type 2 Tag is one of the tag types that are defined by the NFC Forum. It can be read and re-written, and the memory of the tag can be write protected. The nRF5 SDK provides a Type 2 Tag implementation that supports NFC-A listen mode in read-only state. Listen mode means that the tag "listens" (or waits) for polling devices, but it does not actively start a connection. Read only means that the memory of the tag is write protected and cannot be altered or re-written by the polling device.

The Type 2 Tag library provides functions to enable the NFC tag and configure the tag data. It uses the NFCT driver module to access the NFCT hardware. The Type 2 Tag library is available as a precompiled linkable library. Its API is described in NFC tag 2 type emulation library.

Note
When using NFCT driver, you must enable the clock in the sdk_config configuration file. To do that, set the following configuration parameter:
#define NRF_CLOCK_ENABLED 1
Additionally, you cannot use TIMER4 because it is used by the NFCT driver.

If you use the supplied library, you do not need to care about the actual data format that is used to implement the tag. You can just follow the steps outlined in Programming a tag to configure the tag data. If you want to read about the data format and the supported commands, see Data format and Command set.

To read data from the NFC tag, a polling device (also called NFC Forum Device) is needed. In most cases, this will be a mobile device with an NFC interface, such as a smartphone or a tablet. However, if you want to work in fully embedded environment, you can use an Adafruit PN532 NFC shield together with an nRF5 Development Kit to create your own polling device. The shield uses the ported Adafruit NFC Shield library to communicate with an nRF5 Series IC through a TWI interface. It reads the raw data of the tag; use the Type 2 Tag parser to parse the data into Type 2 Tag format.

Programming a tag

Data format

Command set

Type 2 Tag parser


Documentation feedback | Developer Zone | Subscribe | Updated