Data Sheet

MFRC522 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2016. All rights reserved.
Product data sheet
COMPANY PUBLIC
Rev. 3.9 — 27 April 2016
112139 70 of 95
NXP Semiconductors
MFRC522
Standard performance MIFARE and NTAG frontend
10. MFRC522 command set
10.1 General description
The MFRC522 operation is determined by a state machine capable of performing a set of
commands. A command is executed by writing a command code (see Table 149
) to the
CommandReg register.
Arguments and/or data necessary to process a command are exchanged via the FIFO
buffer.
10.2 General behavior
Each command that needs a data bit stream (or data byte stream) as an input
immediately processes any data in the FIFO buffer. An exception to this rule is the
Transceive command. Using this command, transmission is started with the
BitFramingReg register’s StartSend bit.
Each command that needs a certain number of arguments, starts processing only
when it has received the correct number of arguments from the FIFO buffer.
The FIFO buffer is not automatically cleared when commands start. This makes it
possible to write command arguments and/or the data bytes to the FIFO buffer and
then start the command.
Each command can be interrupted by the host writing a new command code to the
CommandReg register, for example, the Idle command.
10.3 MFRC522 command overview
Table 149. Command overview
Command Command
code
Action
Idle 0000 no action, cancels current command execution
Mem 0001 stores 25 bytes into the internal buffer
Generate RandomID 0010 generates a 10-byte random ID number
CalcCRC 0011 activates the CRC coprocessor or performs a self test
Transmit 0100 transmits data from the FIFO buffer
NoCmdChange 0111 no command change, can be used to modify the
CommandReg register bits without affecting the command,
for example, the PowerDown bit
Receive 1000 activates the receiver circuits
Transceive 1100 transmits data from FIFO buffer to antenna and automatically
activates the receiver after transmission
- 1101 reserved for future use
MFAuthent 1110 performs the MIFARE standard authentication as a reader
SoftReset 1111 resets the MFRC522