Multiple NDEF Records in a single STM’s NFC/RFID Tag


Salil Jain, Sr. Design Engineer, IPD System Lab and Technical Marketing, STMicroelectronics, India
Raunaque Mujeeb QUAISER, Senior Manager, IPD System Lab and Technical Marketing, STMicroelectronics, India

With the advent of technological innovations and fast pace life style, the human – machine interactions are increasingly becoming complex and challenging with almost every person communicating concurrently with multiple devices. Most of these devices are Smartphones, Personal Display Assistant having connectivity based on different wireless connectivity protocol. The common wireless connectivity protocols are BT/BTLE and Wi-Fi.

The connection to BT/BTLE and Wi-Fi devices requires the user to follow connection and pairing steps before they can be used for communication. Sometimes it take more steps to connect to these technology and sometimes the password is too cryptic to type without any error. Near Field Communication passive tag provides solution to the above problem and it can be used flawlessly to do the pairing and connection. The NFC forum talks of data structure format for different data types such as Bluetooth Handover message, Wi-Fi handover message, SMS, text etc. This creates a use case where it appreciated to have a NFC Tag with a bigger EEPROM so that different data structures can be put in single tag and the cost can be saved. ST has dynamic RFID tag with a bigger EEPROM section which can accommodate different data structures as defined by NFC forum.


Figure 1. Multi NDEF record using M24SR

STMicroelectronics M24SR series is also known as dynamic NFC/RFID tag. It supports NDEF (NFC data exchange format) format as proposed by the NFC forum. Figure 1 is showing different type of records supported by NDEF.M24SR embeds up to 64 Kbits memory. As shown in Figure 2, it can be operated from an I2C interface or by a 13.56 MHz RFID reader or an NFC enabled smartphone. The radio frequency protocol is compatible with ISO/IEC 14443 Type A and NFC Forum type 4. It enables NFC use cases such as simple Bluetooth pairing and other connection handovers, automatic links to URLs, storage of V-card and other types of information. NFC Tag finds its usage in a wide variety of applications, including consumer electronics, computer peripherals, home appliances, industrial automation and healthcare products.

image 2

Figure 2. M24SR working principle

I2C Communication with NFC/RFID Tag for Multiple NDEF records:

M24SR communicates with MCU (Microcontroller Unit) using I2C (Inter Integrated Circuit) communication. The I2C interface uses a two-wire serial interface, consisting of a bidirectional data line and a clock line. It behaves as a slave in the I2C protocol. The devices carry a built-in 4-bit device type identifier code in accordance with the I²C bus definition. The RF and I2C host can read or write to the same memory that is why only one host can communicate at a time with the M24SR.

Memory of NFC Forum Type 4 Tag is organized as:

  • One “Capability Container” (CC) file: this read-only file describes the other files that are present in the memory, by consecutive description blocks (called TLV(Type Length Value)
  • One mandatory NDEF file: this file is necessarily the first one described in CC file
  • 0, 1 or more proprietary files: if any, proprietary files are described in following TLV blocks. A TLV block gives information on a file: file ID, file length, read and write access rights.


Figure 3. M24SR Memory Architecture

In addition to these files, M24SR contain a proprietary System file, to handle M24SR specific advanced parameters/features. Figure 3 is showing the pictorial view of M24SR Memory.

NDEF File:
NDEF stands for NFC Data Exchange Format defined by NFC forum ( An NDEF file contains the NDEF message length in the first 2 bytes, and an NDEF message of 1 or more NDEF records. Each record contains a consistent set of data, of a specific type. These data types are what we call “standard NDEF data” as shown in Figure 4.


Figure 4. Multiple NDEF record in single message

Application Firmware Architecture:
User can also change the M24SR content by I2C and check the same using RF (Radio Frequency). Application firmware architecture is mentioned in Figure 5through which user can write different records. It has modular approach for the easy understanding of the developer community and helps in the code reusability.


Figure 5: Firmware Architecture

File Organization:
In Figure 6, blue color box shows the files that are not linked directly to M24SR, but to the NFC protocol. User can create the irown record or modify the existing one for development. Yellow color boxes are directly linked with M24SR. Green color boxes are Hardware abstraction layer. If the developer decides to change the hardware platform then it can be modified accordingly.


Figure 6: Source File Organization

Android Application
Multiple NDEF Record is an Android based application which can be easily downloaded from Google Play Store on NFC compatible smartphone using following link:

The App allows the user to writedifferent types of NDEF record in the memory of the M24SR NFC Tag. The App supports multiple type of records such as Text, URL, Mail, Contact, Bluetooth Pairing and Wi-Fi Handover message in single Tag. All the records of NDEF format follow the standard format described by

Read & Write Feature of App
Application allows the user to read and write multiple records in the M24SR NFC Tag. The user need a Tag which is detected by the NFC enabled Smartphone when brought to the close proximity. Read options enables the user to read multiple records already programmed in M24SR NFC Tag. Write option of the App allows the user to program an empty M24SR NFC Tag memory with the multiple NDEF Records. User select the write option followed by entering the details of different records like text message, Contact number, v-card, mail-id, Handover message for Bluetooth and Wi-Fi as shown in Figure 7.


Figure 7. Android App for Multiple NDEF record

It is not necessary to enter all the record information in App. We can just enter the details of record that we want to be programmed in our Tag.

image 8

Figure 8. Wi-Fi hand over message

Types of NDEF Records with Examples

1. Plain Text Record: A Plain Text Record is an NDEF record that is used to store plain text on an NFC Tag. e.g.: [{“LanguageCode”:”English”,”Text”:”This is plain text!”,”EncodingType”:”UTF8″,”RecordType”:”Text”}]
2. URI Record (Uniform resource Identifier): A URI Record is an NDEF Record used to represent raw actions. An Uri consists of a prefix and its contents. These generally include the Website Records. e.g.:,
3. Contact Card: A Contact Card is an NDEF record that is used to share contact data using the vCard 2.1 Card Format.vCard is a file format standard for electronic business cards. They contain name, address information, phone numbers, e-mail addresses, URLs, logos, photographs and audio clips.
4. e-mail records: email NDEF Records are used to program the email address. It is used to directly compose email message. e.g.:, Wi-Fi Handover message, Bluetooth Handover message
5. Wi-Fi Handover Message: Wi-Fi handover message is to enable connection handover by taking the advantage of the NFC technology. NFC Forum ( has defined NDEF based packet format which should be used to transfer the Wi-Fi connection information over NFC communication
6. Bluetooth Handover Message: Bluetooth handover message is to do establish the Bluetooth communication using the NFC technology without the user intervention of putting pass key and authentication. NFC Forum ( as defined NDEF based packet format which should be used to transfer the Bluetooth radio information over NFC communication.

NFC technology is finding its usage in many electronic designs these days. This had led to the requirement of NFC tag with more memory to support multiple application with single NFC Tag. The offering from STMicroelectronics of NFC Tag with more memory in EEPROM fits this requirement as different NDEF records can be programmed in single NFC Tag.