This document describes the functionality and electrical specifications of the
transceiver IC PN512.
The PN512 is a highly integrated transceiver IC for contactless communication at
13.56 MHz. This transceiver IC utilizes an outstanding modulation and demodulation
concept completely integrated for different kinds of contactless communication methods
and protocols at 13.56 MHz.
The PN512 is available in three versions:
Product data sheet
COMPANY PUBLIC
• PN5120A0HN1/C2 (HVQFN32) and PN5120A0HN/C2 (HVQFN40), hereafte r named
as version 2.0
• PN512AA0HN1/C2 (HVQFN32) and PN512AA0HN1/C2BI (HVQFN32 with Burn In),
hereafter named as industrial version, fulfilling the automotive qualification stated in
AEC-Q100 grad 3 from the Automotive Electronics Council, defining the critical stress
test qualification for automotive integrated circuits (ICs).
• PN5120A0HN1/C1(HVQFN32) and PN5120A0HN/C1 (HVQFN40), hereafter named
as version 1.0
The data sheet describes the functionality for the industrial version and version 2.0. The
differences of the version 1.0 to the version 2.0 are summarized in Section 21
industrial version has only differences within the outlined characteristics and limitations.
2. General description
The PN512 transceiver ICs support 4 different operating modes
• Reader/Writer mode supporting ISO/IEC 14443A/MIFARE and FeliCa scheme
• Reader/Writer mode supporting ISO/IEC 14443B
• Card Operation mode supporting ISO/IEC 14443A/MIFARE and FeliCa scheme
• NFCIP-1 mode
. The
Enabled in Reader/Writer mode for ISO/IEC 14443A/MIFARE, the PN512’s internal
transmitter part is able to drive a reader/writer antenna designed to communicate with
ISO/IEC 14443A/ MIF A RE card s and transponder s withou t a dditional active circuitry. The
receiver part provides a robust and efficient implementation of a demodulation and
NXP Semiconductors
decoding circuitry for signals from ISO/IEC 14443A/MIFARE compatible cards and
transponders. The digital part handles the complete ISO/IEC 14443A framing and error
detection (Parity & CRC).
The PN512 supports MIF ARE 1K or MIF ARE 4K emulation p roducts. The PN512 support s
contactless communication using MIFARE higher transfer speeds up to 424 kbit/s in both
directions.
Enabled in Reader/Writer mode for FeliCa, the PN512 transceiver IC supports the FeliCa
communication scheme. The receiver part provides a robust and efficient implementation
of the demodulation and decoding circuitry for FeliCa coded signals. The digital part
handles the FeliCa framing and error detection like CRC. The PN512 supports contactless
communication using FeliCa Higher transfer speeds up to 424 kbit/s in both directions.
The PN512 supports all layers of the ISO/IEC 14443B reader/writer communication
scheme, given correct implementation of additional components, like oscillator, power
supply, coil etc. and provided that standardized protocols, e.g. like ISO/IEC 14443-4
and/or ISO/IEC 14443B anticollision are correctly implemented.
In Card Operation mode, the PN512 transceiver IC is able to answer to a reader/writer
command either according to the FeliCa or ISO/IEC 14443A/MIFARE card interface
scheme. The PN512 generates the digital load modulated signals and in addition with an
external circuit the answer can be sent back to the re ad e r/ writ er. A complete card
functionality is only possible in combination with a secure IC using the S
PN512
Transm ission module
2
C interface.
Additionally, the PN512 transceiver IC offers the possibility to communicate directly to an
NFCIP-1 device in the NFCIP-1 mode. The NFCIP-1 mode of fers dif ferent communication
mode and transfer speeds up to 424 kbit/s according to the Ecma 340 a nd ISO/IEC 18092
NFCIP-1 Standard. The digital part handles th e complete NFCIP-1 framing and error
detection.
Various host controller interfaces are implemented:
• 8-bit parallel interface
1
• SPI interface
• serial UART (similar to RS232 with voltage levels according pad voltage supply)
2
• I
C interface.
A purchaser of this NXP IC has to take care for appropriate third party patent licenses.
1.8-bit parallel Interface only available in HVQFN40 package.
Highly integrated analog circuitry to demodulate and decode responses
Buffered output drivers for connecting an antenna with the minimum number of
external components
Integrated RF Level detector
Integrated data mode detector
Supports ISO/IEC 14443 A/MIFARE
Supports ISO/IEC 14443 B Read/Write modes
Typical operating distance in Read/Write mode up to 50 mm depending on the
antenna size and tuning
Typical operating distance in NFCIP-1 mode up to 50 mm depending on the antenna
size and tuning and power supply
Typical operating distance in ISO/IEC 14443A/MIFARE card or FeliCa Card Op eration
mode of about 100 mm depending on the antenna size and tuning and the external
field strength
Supports MIFARE 1K or MIFARE 4K emulation encryption in Reader/Writer mode
ISO/IEC 14443A higher transfer speed communication at 212 kbit/s and 424 kbit/s
Contactless communication according to the FeliCa scheme at 212 kbit/s and
424 kbit/s
In te gr at ed RF int er fa ce fo r NF CIP- 1 up to 424 kbit/s
2
C interface
S
Additional power supply to directly supply the smart card IC connected via S
Su pp or te d ho st inter fa ce s
SPI up to 10 Mbit/s
2
C-bus interface up to 400 kBd in Fast mode, up to 3400 kBd in High-speed mode
I
RS232 Serial UART up to 1228.8 kBd, with voltage levels dependant on pin
voltage supply
8-bit parallel interface with and without Address Latch Enable
FIFO buffer handles 64 byte send and receive
Flexible interrupt modes
Hard reset with low power function
Power-down mode per software
Programmable timer
Internal oscillator for connection to 27.12 MHz quartz crystal
2. 5 V to 3.6 V power supply
CRC coprocessor
Programmable I/O pins
Internal self-t es t
[1] Supply voltages below 3 V reduce the performance in, for example, the achievable operating distance.
[2] V
[3] V
[4] I
[5] I
[6] I
[7] During typical circuit operation, the overall current is below 100 mA.
[8] Typical value using a complementary driver configuration and an antenna matched to 40 between pins TX1 and TX2 at 13.56 MHz.
The analog interface handles the modulation and demodulation of the analog signals
according to the Card Receiving mode, Reader/Writer mode and NFCIP-1 mode
communication scheme.
The RF level detector detects the presence of an external RF-field delivered by the
antenna to the RX pin.
The Data mode detector detects a MIFARE, FeliCa or NFCIP-1 mode in order to prepare
the internal receiver to demodulate signals, which are sent to the PN512.
The communication (S
transfer speeds above 424 kbit/s and digital signals to communicate to a secure IC.
The contactless UART manages the protocol requirements for the communication
protocols in cooperation with the host. The FIFO buffer ensures fast and convenient data
transfer to and from the host and the contactless UART and vice versa.
Various host interfaces are implemented to meet different customer requirements.
PN512
Transm ission module
2
C) interface provides digital signals to support communication for
1A1IAddress Line
2PVDDPWRPad power supply
3DVDDPWRDigital Power Supply
4DVSSPWRDigital Ground
5PVSSPWRPad power supply ground
6NRSTPDINot Reset and Power Down: When LOW, intern al current sinks are switched off, the
7SIGINICommunication Interface Input: accepts a digital, serial data stream
8SIGOUTOCommunication Interface Output: delivers a serial data stream
9SVDDPWRS2C Pad Power Supply: provides power to the S
10TVSSPWRTransmitter Ground: supplies the output stage of TX1 and TX2
11TX1OTransmitter 1: delivers the modulated 13.56 MHz energy carrier
12TVDDPWRTransmitter Power Supply: supplies the output stage of TX1 and TX2
13TX2OTransmitter 2: delivers the modulated 13.56 MHz energy carrier
14TVSSPWRTransmitter Ground: supplies the output stage of TX1 and TX2
15AVDDPWRAnalog Power Supply
16VMIDPWRInternal Reference Voltage: This pin delivers the internal reference voltage.
17RXIReceiver Input
18AVSSPWRAnalog Ground
19AUX1OAuxiliary Outputs: These pins are used for testing.
20AUX2O
21OSCINICrystal Oscillator Input: input to the inverting amplifier of the oscillator. This pin is
22OSCOUTOCrystal Oscillator Output: Output of the inverting amplifier of the oscillator.
23IRQOInterrupt Request: output to signal an interrupt event
24ALEIAddress Latch Enable: signal to latch AD0 to AD5 into the internal address latch
25 to 31D1 to D7I/O8-bit Bi-directional Data Bus.
32A0IAddress Line
oscillator is inhibited, and the input pads are disconnected from the outside world. With
a positive edge on this pin the internal reset phase starts.
2
C pads
also the input for an externally generated clock (f
= 27.12 MHz).
osc
when HIGH.
Remark: An 8-bit parallel interface is not available.
2
Remark: If the host controller selects I
can be used to define the I
2
C address.
C as digital host controller interface, these pins
Remark: For serial interfaces this pins can be used for test signals or I/Os.
1 to 4A2 to A5IAddress Line
5PVDDPWRPad power supply
6DVDDPWRDigital Power Supply
7DVSSPWRDigital Ground
8PVSSPWRPad power supply ground
9NRSTPDINot Reset and Power Down: When LOW, intern al current sinks are switched off, the
oscillator is inhibited, and the input pads are disconnected from the outside world. With
a positive edge on this pin the internal reset phase starts.
10SIGINICommunication Interface Input: acce pts a digital, serial data stream
11SIGOUTOCommunica tion Interface Output: delivers a serial data stream
2
12SVDDPWRS
C Pad Power Supply: provides power to the S2C pads
13TVSSPWRTransmitter Ground: supplies the output stage of TX1 and TX2
14TX1OTransmitter 1: delivers the modulated 13.56 MHz energy carrier
15TVDDPWRTransmitter Power Supply: supplies the output stage of TX1 and TX2
16TX2OTransmitter 2: delivers the modulated 13.56 MHz energy carrier
17TVSSPWRTransmitter Ground: supplies the output stage of TX1 and TX2
18AVDDPWRAnalog Power Supply
19VMIDPWRInternal Reference Voltage: This pin delivers the internal reference voltage.
20RXIReceiver Input
21AVSSPWRAnalog Ground
22AUX1OAuxiliary Outputs: These pins are used for testing.
23AUX2O
24OSCINICrystal Oscillator Input: input to the inverting amplifier of the oscillator. This pin is
also the input for an externally generated clock (f
= 27.12 MHz).
osc
25OSCOUTOCrystal Oscillator Output: Output of the inverting amplifier of the oscillator.
26IRQOInterrupt Request: output to signal an interrupt event
27NWRINot Write: strobe to write data (applied on D0 to D7) into the PN512 register
28NRDINot Read: strobe to read data from the PN512 register (applied on D0 to D7)
29ALEIAddress Latch Enable: signal to latch AD0 to AD5 into the internal address latch
when HIGH.
30NCSINot Chip Select: selects and activates the host controller interface of the PN512
31 to 38D0 to D7I/O8-bit Bi-directional Data Bus.
Remark: For serial interfaces this pins can be used for test signals or I/Os.
2
Remark: If the host controller selects I
C as digital host controller interface, these pins
can be used to define the I2C address.
39 to 40A0 to A1IAddress Line
The PN512 transmission module supports the Read/Write mode for
ISO/IEC 14443 A/MIFARE and ISO/IEC 14443 B using various transfer speeds and
modulation protocols.
PN512 transceiver IC supports the following operating modes:
• Reader/Writer mode supporting ISO/IEC 14443A/MIFARE and FeliCa scheme
• Card Operation mode supporting ISO/IEC 14443A/MIFARE and FeliCa scheme
• NFCIP-1 mode
The modes support different transfer speeds and modulation schemes. The following
chapters will explain the different modes in detail.
Note: All indicated modulation indices and modes in this chapter are system parameters.
This means that beside the IC settings a suitable antenna tuning is require d to achieve the
optimum performance.
PN512
Transm ission module
Fig 5.PN512 Read/Write mode
8.1ISO/IEC 14443 A/MIFARE functionality
The physical level communication is shown in Figure 6.
Fig 6.ISO/IEC 14443 A/MIFARE Read/Write mode communication diagram
The physical parameters are described in Table 4.
T able 5.Communication overview for ISO/IEC 14443 A/MIFARE reader/writer
Communication
direction
Reader to card (send
data from the PN512
to a card)
Signal typeTransfer speed
106 kBd212 kBd424 kBd
reader side
100 % ASK100 % ASK100 % ASK
modulation
bit encodingmodified Miller
encoding
modified Miller
encoding
bit length128 (13.56 s)64 (13.56 s)32 (13.56 s)
ISO/IEC 14443 A framing at 212 kBd, 424 kBd and 848 kBd
8-bit data8-bit data8-bit data
odd
parity
odd
parity
start
even
parity
start bit is 0
burst of 32
subcarrier clocks
even parity at the
end of the frame
PN512
Transm ission module
T able 5.Communication overview for ISO/IEC 14443 A/MIFARE reader/writer
Communication
direction
Card to reader
(PN512 receives data
from a card)
Signal typeTransfer speed
106 kBd212 kBd424 kBd
card side
modulation
subcarrier
subcarrier load
modulation
13.56 MHz/1613.56 MHz/1613 .56 MHz/16
subcarrier load
modulation
…continued
subcarrier load
modulation
frequency
bit encodingManchester
BPSKBPSK
encoding
The PN512’s contactless UART and dedicated external host must manage the complete
ISO/IEC 14443 A/MIFARE protocol. Figure 7
shows the data coding and framing
according to ISO/IEC 14443 A/MIFARE.
Fig 7.Data coding and framing according to ISO/IEC 14443 A
The internal CRC coprocessor calculates the CRC value based on ISO/IEC 14443 A
part 3 and handles parity generation internally according to the transfer speed. Automatic
parity generation can be switched off using th e ManualRCVReg register’s ParityDisable
bit.
8.2ISO/IEC 14443 B functionality
The MFRC523 reader IC fully supports international standard ISO 14443 which includes
communication schemes ISO 14443 A and ISO 14443 B.
Refer to the ISO 14443 reference documents Identification cards - Contactless integrated circuit cards - Proximity cards (parts 1 to 4).
Remark: NXP Semiconductors does not of fer a soft ware library to enable design -in of the
ISO 14443 B protocol.
Rev. 4.2 — 28 August 2012
111342 12 of 132
NXP Semiconductors
2. PICC to PCD, > 12 % ASK loadmodulation
Manchester coded, baudrate 212 to 424 kbaud
1. PCD to PICC, 8-30 % ASK
Manchester coded, baudrate 212 to 424 kbaud
001aan214
PN512
FeliCa CARD
(PICC)
Felica READER
(PCD)
8.3FeliCa reader/writer functionality
The FeliCa mode is the general reader/writer to card communication scheme according to
the FeliCa specification. The following diagram describes the communication on a
physical level, the communication overview describes the physical parameters.
Fig 8. FeliCa reader/writer communication diagram
Table 6.Communication overview for FeliCa reader/writer
Communication
direction
PN512 cardModulation on reader side8-30 % ASK8-30 % ASK
bit codingManchester CodingManchester Coding
Bitlength(64/13.56) s(32/13.56) s
bit codingManchester codingManchester coding
The contactless UART of PN512 and a dedicated external host controller are required to
handle the complete FeliCa protocol.
8.3.1FeliCa framing and coding
Table 7.FeliCa framing and coding
PreambleSyncLenn-DataCRC
00h00h00h00h00h00hB2h4Dh
To enable the FeliCa communication a 6 byte preamble (00h, 00h, 00h, 00h, 00h, 00h)
and 2 bytes Sync bytes (B2h, 4Dh) are sent to synchronize the receiver.
The following Len byte indicates the length of the se nt dat a b ytes plus the LEN byte itself.
The CRC calculation is done according to the FeliCa definitions with the MSB first.
To transmit data on the RF interface, the host controller has to send the Len- and databytes to the PN512's FIFO-buffer. The preamble and the sync bytes are generated by the
PN512 automatically and must not be written to the FIFO by the host controller. The
PN512 performs internally the CRC calculation and adds the result to the data frame.
Example for FeliCa CRC Calculation:
Table 8.Start value for the CRC Polynomial: (00h), (00h)
The NFCIP-1 communication differentiates between an active and a Passive
Communication mode.
• Active Communication mode means both the initiator and the target are using their
• Passive Communication mode means that the target answers to an initiator command
• Initiator: generates RF field at 13.56 MHz and starts the NFCIP-1 communication
• Target: responds to initiator command either in a load modulation scheme in Passive
In order to fully support the NFCIP-1 standard the PN512 supports the Active and Passive
Communication mode at the transfer speeds 106 kbit/s, 212 kbit/s and 42 4 kbit/s as
defined in the NFCIP-1 standard.
PN512
Transm ission module
own RF field to transmit data.
in a load modulation scheme. The initiator is active in terms of generating the RF field.
Communication mode or using a self generat ed and self modulated RF field for Active
Communication mode.
this communication
100 % ASK,
Modified
Miller Coded
The contactless UART of PN512 and a dedicated host controller are required to handle
the NFCIP-1 protocol.
Note: Transfer Speeds above 424 kbit/s are not defined in the NFCIP-1 standard. The
PN512 supports these transfer speeds only with dedicated extern al circuits.
1. initiator starts communication
at selected transfer speed
2. targets answers using
load modulated data
at the same transfer speed
host
NFC TARGET
powered for
digital processing
001aan217
8.4.2Passive communication mode
Passive Communication mode means that the target answers to an initiator command in a
load modulation scheme. The initiator is active meaning generating the RF field.
Fig 11. Passive communication mode
Table 10.Communication overview for Passive communication mod e
ISO/IEC 14443A
subcarrier load
modulation,
Manchester Coded
According to FeliCa, 8-30
% ASK Manchester Coded
According to FeliCa, > 12 %
ASK Manchester Coded
digital capability to handle
this communication
The contactless UART of PN512 and a dedicated host controller are required to handle
the NFCIP-1 protocol.
Note: Transfer Speeds above 424 kbit/s are not defined in the NFCIP-1 standard. The
PN512 supports these transfer speeds only with dedicated extern al circuits.
The NFCIP-1 framing and coding in Active and Passive Communication mode is defined
in the NFCIP-1 standard.
Table 11.Framing and coding overview
Transfer speedFraming and Coding
106 kbit/sAccording to the ISO/IEC 14443A/MIFARE scheme
212 kbit/sAccording to the FeliCa scheme
424 kbit/s According to the FeliCa scheme
8.4.4NFCIP-1 protocol support
The NFCIP-1 protocol is not completely described in this document. For detailed
explanation of the protocol refer to the NFCIP-1 standard. However the datalink layer is
according to the following policy:
• Speed shall not be changed while continuum data exchange in a transaction.
• Transaction includes initialization and anticollision methods and data exchange (in
PN512
Transm ission module
continuous way, meaning no interruption by another transaction).
In order not to disturb current infrastructure based on 13.56 MHz general rules to start
NFCIP-1 communication are defined in the following way.
1. Per default NFCIP-1 device is in Target mode meaning its RF field is switched off.
2. The RF level detector is active.
3. Only if application requires the NFCIP-1 device shall switch to Initiator mode.
4. Initiator shall only switch on its RF field if no external RF field is detected by RF Level
detector during a time of TIDT.
5. The initiator performs initialization according to the selected mode.
8.4.5MIFARE Card operation mode
T able 12. MIFARE Card operation mode
Communication
direction
transfer speed 106 kbit/s212 kbit/s424 kbit/s
reader/writer
PN512
PN512 reader/
writer
Modulation on
reader side
bit codingModified MillerModified MillerModified Miller
Bitlength(128/13.56) s(64/13.56) s(32/13.56) s
Modulation on
0PageRegSelects the register page
1CommandRegStarts and stops command execution
2ComlEnRegControls bits to enable and disable the passing of Interrupt Requests
3DivlEnRegControls bits to enable and disa ble the passing of Interrupt Requests
4ComIrqRegContains Interrupt Request bits
5DivIrqRegContains Interrupt Request bits
6ErrorRegError bits showing the error status of the last command executed
7St a tus1RegCont ains st atus bits for communication
8St a tus2RegCont ains st atus bits of the receiver and transmitter
9FIFODataRegIn- and output of 64 byte FIFO-buffer
AFIFOLevelRegIndicates the number of bytes stored in the FIFO
BWaterLevelRegDefines the level for FIFO under- and overflow warning
CControlRegContains miscellaneous Control Registers
DBitFramingRegAdjustments for bit oriented frames
ECollRegBit positi on of the first bit collision detected on the RF-interface
FRFUReserved for future use
Page 1: Command
0PageRegSelects the register page
1ModeRegDefines general modes for transmitting and receiving
2TxModeRegDefines the data rate and framing during transmission
3RxModeRegDefines the data rate and framing during receiving
4TxControlRegControls the logical behavior of the antenna driver pins T X1 and TX2
5TxAutoRegControls the setting of the antenna drivers
Register NameFunction
PN512
Transm ission module
FeliCaFeliCa Higher
transfer speeds
Transfer speed212 kbit/s424 kbit/s
Modulation on reader side8-30 % ASK8-30 % ASK
bit codingManchester CodingManchester Coding
Bitlength(64/13.56) s(32/13.56) s
Load modulation on PN512
6TxSelRegSelects the internal sources for the antenna driver
7RxSelRegSelects internal receiver settings
8RxThresholdReg Selects thresholds for the bit decoder
9DemodRegDefines demodulator settings
AFelNFC1RegDefines the length of the valid range for the receive package
BFelNFC2RegDefines the length of the valid range for the receive package
CMifNFCRegControls the communication in ISO/IEC 14443/MIFARE and NFC
DManualRCVRegAllows manual fine tuning of the internal receiver
ETypeBRegConfigure th e ISO/IEC 14443 type B
FSerialSpeedRegSelects the speed of the serial UART interface
Page 2: CFG
0PageRegSelects the register page
1CRCResultRegShows the actual MSB and LSB values of the CRC calculation
2
3GsNOffRegSelects the conductance of the antenna driver pins TX1 and TX2 for
4ModWidthRegControls the setting of the ModWidth
5TxBitPhaseRegAdjust the TX bit phase at 106 kbit
6RFCfgRegConfigures the receiver gain and RF level
7GsNOnRegSelects the conductance of the antenna driver pins TX1 and TX2 for
8CWGsPRegSelects the conductance of the antenna driver pins TX1 and TX2 for
9ModGsPRegSelects the conductance of the antenna driver pins TX1 and TX2 for
ATModeReg
B
CTReloadRegDescribes the 16-bit timer reload value
D
ETCounterValReg Shows the 16-bit actual timer value
F
Page 3: TestRegister
0PageRegselects the register page
1TestSel1RegGeneral test signal configuration
2TestSel2RegGeneral test signal configuration and PRBS control
3TestPinEnRegEnables pin output driver on 8-bit parallel bus (Note: For serial
4TestPin
5TestBusRegShows the status of the internal testbus
6AutoTestRegControls the digital selftest
Register NameFunction
target mode at 106 kbit
modulation, when the driver is switched off
modulation when the drivers are switched on
modulation during times of no modulation
modulation during modulation
Defines settings for the internal timer
TPrescalerReg
interfaces only)
Defines the values for the 8-bit parallel bus when it is used as I/O bus
7VersionRegShows the version
8AnalogTestRegControls the pins AUX1 and AUX2
9TestDAC1RegDefines the test value for the TestDAC1
ATestDAC2RegDefines the test value for the TestDAC2
BTestADCRegShows th e actual value of ADC I and Q
C-FRFTReserved for production tests
Register NameFunction
9.1.1Register bit behavior
Depending on the functionality of a register , the access conditions to the register can vary.
In principle bits with same behavior are grouped in co mmon registers. In Table 15
access conditions are described.
Table 15.Behavior of register bits and its designation
Abbreviation BehaviorDescription
r/wread and write These bits can be written and read by the -Controller. Since they
dydynamicThese bits can be written and read by the -Controller.
rread onlyThese registers hold bits, which value is determined by internal
wwrite onlyReading these registers returns always ZERO.
RFU -These registers are reserved for future use.
RFT -These registers are reserved for production tests and shall not be
…continued
the
are used only for control means, there content is not influenced by
internal state machines, e.g. the PageSelect-Register may be
written and read by the -Controller. It will also be read by internal
state machines, but never changed by them.
Nevertheless, they may also be written automatically by internal
state machines, e.g. the Command-Register changes its value
automatically after the execution of the actual command.
states only, e.g. the CRCReady bit can not be written from
external but shows internal states.
In case of a PN512 Version version 2.0 (VersionReg = 82h) a
read access to these registers returns always the value “0”.
Nevertheless this is not guaranteed for future chips versions
where the value is undefined. In case of a write access, it is
recommended to write always the value “0”.
7 to 6-Reserved for future use.
5RcvOffSet to logic 1, the analog part of the receiver is switched off.
4PowerDownSet to logic 1, Soft Power-down mode is entered.
3 to 0CommandActivates a command according to the Command Code. Reading this
RFURFUr/wdy dydydydy
76543210
00RcvOffPower DownCommand
Set to logic 0, the PN512 starts the wake up procedure. During this
procedure this bit still shows a 1. A 0 indicates that the PN512 is ready
for operations; see Section 16.2 “
Soft power-down mode”.
Note: The bit Power Down cannot be set, when the command
SoftReset has been activated.
register shows, which command is actually executed (see Section 19.3
register Status1Reg. Set to logic 0, the signal on pin IRQ is equal to bit IRq.
In combination with bit IRqPushPull in register DivIEnReg, the default value
of 1 ensures, that the output level on pin IRQ is 3-state.
7IRQPushPullSet to logic 1, the pin IRQ works as standard CMOS output pad.
6 to 5-Reserved for future use.
4SiginActIEnAllows the SIGIN active inte rrupt request to be propagated to pin IRQ.
3ModeIEnAllows the mode interrupt request (indicated by bit ModeIRq) to be
2CRCIEnAllows the CRC interrupt request (indicated by bit CRCIRq) to be
1RfOnIEnAllows the RF field on interrupt request (indicated by bit RfOnIRq) to
0RfOffIEnAllows the RF field off interrupt request (indicated by bit RfOffIRq) to
Table 24.CommIRqReg register (address 04h); rese t value: 14h, 00010100b
Access
Rights
Table 25.Description of CommIRqR eg bits
All bits in the register CommIRqReg shall be cleared by software.
BitSymbolDescription
7Set1Set to logic 1, Set1 defines that the marked bits in the register CommIRqReg
6TxIRqSet to logic 1 immediately after the last bit of the transmitted data was sent out.
5RxIRqSet to logic 1 when the receiver detects the end of a valid datastream.
4IdleIRqSet to logic 1, when a command terminates by itself e.g. when the
3HiAlertIRqSet to logic 1, when bit HiAlert in register Status1Reg is set. In opposition to
2LoAlertIRq Set to logic 1, when bit LoAl ert in register Status1Reg is set. In opposition to
1ErrIRqSet to logic 1 if any error bit in the Error Register is set.
0TimerIRqSet to logic 1 when the timer decrements the TimerValue Register to zero.
during the AutoColl command or MFAuthent command or if data is
written into FIFO by the host controller during the time between
sending the last bit on the RF interface and receiving the last bit on the
RF interface.
[1]
Set to logic 1, if the internal temperature sensor detects overheating.
In this case, the antenna drivers are switched off automatically.
not switch on the RF field in time as defined in NFCIP-1 standard.
Note: RFErr is only used in Active Communication mode. The bits
RxFraming or the bits TxFraming has to be set to 01 to enable this
functionality.
(e.g. receiver) tries to write data into the FIFO-bufferFIFO-buffer
although the FIFO-buffer is already full.
receiver start-up phase. This bit is only valid during the bitwise
anticollision at 106 kbit. During communication sch emes at 212 and
424 kbit this bit is always set to logic 1.
CRC calculation fails. It is cleared to 0 automatically at receiver
start-up phase.
at receiver start-up phase. Only valid for ISO/IEC 14443A/MIFARE or
NFCIP-1 communication at 106 kbit.
• Set to logic 1 if the SOF is incorrect. It is cleared automatically at
receiver start-up phase. The bit is only valid for 106 kbit in Active
and Passive Communication mode.
• If bit DetectSync in register ModeReg is set to logic 1 during
FeliCa communication or active communication with transfer
speeds higher than 106 kbit, the bit ProtocolErr is set to logic 1 in
case of a byte length violation.
• During the AutoColl command, bit ProtocolErr is set to logic 1, if
the bit Initiator in register ControlReg is set to logic 1.
• During the MFAuthent Command, bit ProtocolErr is set to logic 1,
if the number of bytes received in one data stream is incorrect.
• Set to logic 1, if the Miller Decoder detects 2 pulses below the
minimum time according to the ISO/IEC 14443A definitions.
[1] Command execution will clear all error bits except for bit TempErr. A setting by software is impossible.
13.56 MHz.
Set to logic 1, if the frequency at the RX pin is in the range
12 MHz < RX pin frequency < 15 MHz.
Note: The value of RFFreqOK is not defined if the external RF
frequency is in the range from 9 to 12 MHz or in the range from
15 to 19 MHz.
reception the bit CRCOk is undefined (use CRCErr in register
ErrorReg). CRCOk indicates the status of the CRC co-processor,
during calculation the value changes to ZERO, when the calculation is
done correctly, the value changes to ONE.
valid for the CRC co-processor calculation using the command
CalcCRC.
to the setting of the interrupt enable bits, see register CommIEnReg
and DivIEnReg).
decrement the TCounterValReg with the next timer clock.
Note: In the gated mode the bit TRunning is set to logic 1, when the
timer is enabled by the register bits. This bit is not influenced by the
gated signal.
7TStopNowSet to logic 1, the timer stops immediately.
6TStartNowSet to logic 1 starts the timer immediately.
5WrNFCIDtoFIFOSet to logic 1, the internal stored NFCID (10 bytes) is copied into the
4In itiatorSet to logic 1, the PN512 acts as initiator, otherwise it acts as target
3-Reserved for future use.
2 to 0RxLastBitsShows the number of valid bits in the last received byte. If zero, the
7ValuesAfterCollIf this bit is set to logic 0, all receiving bits will be cleared after a
6-Reserved for future use.
5CollPosNotValidSet to logic 1, if no Collision is detected or the Position of the
4 to 0CollPosThese bits show the bit position of the first detected collision in a
PN512
Transm ission module
76543210
Values
AfterColl
r/wRFUrrrrrr
0CollPos
CollPos
NotValid
collision. This bit shall only be used during bitwise anticollision at
106 kbit, otherwise it shall be set to logic 1.
Collision is out of the range of bits CollPos. This bit shall only be
interpreted in Passive Communication mode at 106 kbit or
ISO/IEC 14443A/MIFARE Reader/Writer mode.
received frame, only data bits are interpreted.
Example:
th
00hindicates a bit collision in the 32
01hindicates a bit collision in the 1
08hindicates a bit collision in the 8
bit
st
bit
th
bit
These bits shall only be interpreted in Passive Communication mode
at 106 kbit or ISO/IEC 14443A/MIFARE Reader/Writer mode if bit
CollPosNotValid is set to logic 0.
Defines the data rate and framing during transmission.
Table 50.TxModeReg register (a ddress 12h); reset value: 00h, 00000000b
Access
Rights
Table 51.Description of TxModeReg bits
BitSymbolDescription
7TxCRCEnSet to logic 1, this bit enables the CRC generation during data
6 to 4TxSpeedDefines the bit rate while data transmission.
3InvModSet to logic 1, the modulation for transmitting data is inverted.
2TxMixSet to logic 1, the sign al at pin SIGIN is mixed with the internal coder
1 to 0TxFramingDefines the framing used for data transmission.
PN512
Transm ission module
76543210
TxCRCEnTxSpeedInvModTxMixTxFraming
r/wdydydyr/wr/wdydy
transmission.
Note: This bit shall only be set to logic 0 at 106 kbit.
ValueDescription
000106 kbit
001212 kbit
010424 kbit
011848 kbit
1001696 kbit
1013392 kbit
110Reserved
111Reserved
Note: The bit coding for transfer speeds above 424 kbit is equivalent to
the bit coding of Active Communication mode 424 kbit (Ecma 340).
(see Section 12.6 “
ValueDescription
00ISO/IEC 14443A/MIFARE and Passive Communication mode
106 kbit
01Active Communication mode
10FeliCa and Passive communication mode 212 and 424 kbit
1 1ISO/IEC 14443B
7RxCRCEnSet to logic 1, this bit enables the CRC calculation during reception.
6 to 4RxSpeedDefi nes the bit rate while data transmission.
3RxNoErrIf set to logic 1 a not valid received data stream (less than 4 bits
2RxMultipleSet to logic 0, the receiver is deactivated after receiving a data frame.
PN512
Transm ission module
76543210
RxCRCEnRxSpeedRxNoErrRxMultipleRxFraming
r/w dydydyr/w r/w dy dy
Note: This bit shall only be set to logic 0 at 106 kbit.
The PN512’s analog part handles only transfer speeds up to 424 kbit
internally, the digital UART handles the higher transfer speeds as well.
ValueDescription
000106 kbit
001212 kbit
010424 kbit
011848 kbit
1001696 kbit
1013392 kbit
110Reserved
111Reserved
Note: The bit coding for transfer speeds above 424 kbit is equivalent to
the bit coding of Active Communication mode 424 kbit (Ecma 340).
received) will be ignored. The receiver will remain active.
For ISO/IEC14443B also RxSOFReq logic 1 is required to ignore a non
valid datastream.
Set to logic 1, it is possible to receive more than one data frame. Having
set this bit, the receive and transceive commands will not terminate
automatically. In this case the multiple receiving can only be deactivated
by writing any command (except the Receive command) to the
CommandReg register or by clearing the bit by the host controller.
At the end of a received data stream an error byte is added to the FIFO.
The error byte is a copy of the ErrorReg register.
The behaviour for version 1.0 is described in Section 21 “
T able 56. TxAutoReg register (address 15h); reset value: 00h, 00000000b
Access
Rights
Table 57.Description of TxAutoReg bits
BitSymbolDescription
7AutoRFOFFSet to logic 1, all active antenna drivers are switched off after the last
6Force100ASK Set to logic 1, Force100ASK forces a 100% ASK modulation
5AutoWakeUpSet to logic 1, the PN512 in soft Power-down mode will be started by
4-Reserved for future use.
3CAOnSet to logic 1, the collision avoidance is activated and internally the
2InitialRFOnSet to logic 1, the initial RF collision avoidance is performed and the bit
1Tx2RFAutoEn Set to logic 1, the driver Tx2 is switched on after the external RF field
0Tx1RFAutoEn Set to logic 1, the driver Tx1 is switched on after the external RF field
PN512
Transm ission module
76543210
AutoRF
OFF
r/wr/wr/wRFUr/wr/wr/wr/w
Force100
ASK
Auto
WakeUp
0CAOnInitialRFOnTx2RFAut
oEn
data bit has been transmitted as defined in the NFCIP-1.
independent of the setting in register ModGsPReg.
the RF level detector.
value n is set in accordance to the NFCIP-1 Standard.
InitialRFOn is cleared automatically, if the RF is switched on.
Note: The driver, which should be switched on, has to be enabled by
bit Tx2RFAutoEn or bit Tx1RFAutoEn.
is switched off according to the time TADT. If the bits InitialRFOn and
Tx2RFAutoEn are set to logic 1, T x2 is switched on if no external RF
field is detected during the time TIDT.
Note: The times T ADT and TIDT are defined in the NFC IP-1 standard
(ISO/IEC 18092).
is switched off according to the time TADT. If the bit InitialRFOn and
Tx1RFAutoEn are set to logic 1, T x1 is switched on if no external RF
field is detected during the time TIDT.
Note: The times T ADT and TIDT are defined in the NFC IP-1 standard
(ISO/IEC 18092).
3 to 0SigOutSelSelects the input for the SIGOUT Pin.
ValueDescription
0000Tristate
0001Low
0010High
0011TestBus signal as defined by bit TestBusBitSel in register
0100Modulation signal (envelope) from the internal coder
0101Serial data stream to be transmitted
01 10Output signal of the receiver circuit (card modulation signal
0111Serial data stream received.
1000-1011 FeliCa Sam modulation
1100-1111MIFARE Sam modulation
…continued
TestSel1Reg.
regenerated and delayed). This signal is used as data output
signal for SAM interface connection using 3 lines.
Note: To have a valid signal the PN512 has to be set to the
receiving mode by either the Transceive or Receive
command. The bit RxMultiple can be used to keep the PN512
in receiving mode.
Note: Do not use this setting in MIFARE mode. Manchester
coding as data collisions will not be transmitted on the
SIGOUT line.
Note: Do not use this setting in MIFARE mode. Miller coding
7 to 6UartSelSelects the input of the contactless UART
5 to 0RxWaitAfter data transmission, the activation of the receiver is delayed for
PN512
Transm ission module
76543210
UartSelRxWait
r/wr/wr/wr/wr/wr/wr/wr/w
ValueDescription
00Constant Low
01Envelope signal at SIGIN
10Modulation signal from the internal analog part
1 1Modulation signal from SIGIN pin. Only valid for transfer
speeds above 424 kbit
RxWait bit-clocks. During this ‘frame guard time’ any signal at pin RX
is ignored. This parameter is ignored by the Receive command. All
other commands (e.g. Transceive, Autocoll, MFAuthent) use this
parameter. Depending on the mode of the PN512, the counter starts
different. In Passive Communication mode the counter starts with the
last modulation pulse of the transmitted data stream. In Active
Communication mode the counter starts immediately after the external
RF field is switched on.
7WaitForSelectedSet to logic 1, the AutoColl command is only terminated
6ShortTimeSlotDefines the time slot length for Passive Communication mode at
5 to 0DataLenMaxThese bits define the maximum length of the accepted packet
PN512
Transm ission module
76543210
WaitForSelected ShortTimeSlotDataLenMax
r/wr/wr/wr/wr/wr/wr/wr/w
automatically when:
1. A valid command has been received after performing a valid
Select procedure according ISO/IEC 14443A.
2. A valid command has been received after performing a valid
Polling procedure according to the FeliCa specification.
Note: If this bit is set, no active communication is possible.
Note: Setting this bit reduces the host controller interaction in case
of a communication to another device in the same RF field during
Passive Communication mode.
424 kbit. Set to logic 1 a short time slot is used (half of the timeslot
at 212 kbit). Set to logic 0 a long timeslot is used (equal to the
timeslot for 212 kbit).
length: DataLenMax * 4 data packet length
Note: If set to logic 0 the maximum data length is 256 bytes.
This parameter is ignored at 106 kbit if the bit DetectSync in
register ModeReg is set to logic 0. If a received packet is larger
than the defined DataLenMax value, the packet will be ignored.
7 to 5SensMillerThese bits define the sensitivity of the Miller decoder.
4 to 3TauMillerThese bits define the time constant of the Miller decoder.
2MFHaltedSet to logic 1, this bit indicates that the PN512 is set to HALT mode in
1 to 0TxWaitThese bits define the additional response time for the target at 106 kbit
PN512
Transm ission module
76543210
SensMillerTauMillerMFHaltedTxWait
r/wr/wr/wr/wr/wr/wr/wr/w
Card Operation mode at 106 kbit. This bit is either set by the host
controller or by the internal state machine and indicates that only the
code 52h is accepted as a request command. This bit is cleared
automatically by a RF reset.
in Passive Communication mode and during the AutoColl command.
Per default 7 bits are added to the value of the register bit.
5Delay MF_SO If this bit is set to logic 1, the Signal at SIGOUT-pin is delayed, so that
4Parity Disable If this bit is set to logic 1, the ge neration of the Parity bit for
3LargeBWPLLSet to logic 1, the bandwidth of the internal PLL used for clock
2ManualHPCFSet to logic 0, the HPCF bits are ignored and the HPCF settings are
1 to 0HPFCSelects the High Pass Corner Frequency (HPCF) of the filter in the
PN512
Transm ission module
76543210
0FastFilt
MF_SO
RFUr/wr/wr/wr/wr/wr/wr/w
MF_SO
Delay
MF_SO
Parity
Disable
LargeBW
PLL
Manual
HPCF
HPFC
If this bit is set to logic 1, the internal filter for the Miller-Delay Circuit is
set to Fast mode.
Note: This bit should only set to logic 1, if Millerpulses of less than
400 ns Pulse length are expected. At 106 kBaud the typical value is
3us.
in SAM mode the Signal at SIGIN must be 128/fc faster compared to
the ISO/IEC 14443A, to reach the ISO/IEC 14443A restrictions on the
RF-Field.
Note: This delay shall only be activated for setting bits SigOutSel to
(1110b) or (1111b) in register TxSelReg.
transmission and the Parity-Check for receiving is switched off. The
received Parity bit is handled like a data bit.
recovery is extended.
adapted automatically to the receiving mode. Set to logic 1, values of
HPCF are valid.
internal receiver chain
00 For signals with frequency spectrum down to 106 kHz.
01 For signals with frequency spectrum down to 212 kHz.
10 For signals with frequency spectrum down to 424 kHz.
11 For signals with frequency spectrum down to 848 kHz
T able 74. TypeBReg register (address 1Eh); reset value: 00h, 00000000b
Access
Rights
Table 75.Description of TypeBReg bits
BitSymbolDescription
7RxSOFReqIf this bit is set to logic 1, the SOF is required. A datastream starting
6RxEOFReqIf this bit is set to logic 1, the EOF is required. A datastream ending
5-Reserved for future use.
4EOFSOFWidth If this bit is set to logic 1 and EOFSOFAdjust bit is logic 0, the SOF
3NoTxSOFIf this bit is set to logic 1, the generation of the SOF is suppressed.
2NoTxEOFIf this bit is set to logic 1, the generation of the EOF is suppressed.
1 to 0TxEGTThese bits define the length of the EGT.
PN512
Transm ission module
76543210
RxSOF
Req
r/wr/wRFUr/wr/wr/wr/wr/w
RxEOF
Req
0EOFSO
NoTxSOF NoTxEOFTxEGT
FWidth
without SOF is ignored.
If this bit is cleared, a datastream with and without SOF is accepted.
The SOF will be removed and not written into the FIFO.
without EOF will generate a Protocol-Error. If this bit is cleared, a
datastream with and without EOF is accepted. The EOF will be
removed and not written into the FIFO.
For the behaviour in version 1.0, see Section 21 “
Errata sheet” on
page 106.
and EOF will have the maximum length defined in ISO/IEC 14443B.
If this bit is cleared and EOFSOFAdjust bit is logic 0, the SOF and
EOF will have the minimum length defined in ISO/IEC 14443B.
If this bit is set to 1 and the EOFSOFadjust bit is logic 1 will result in
SOF low = (11etu 8 cycles) /fc
SOF high = (2 etu + 8 cycles)/fc
EOF low = (11 etu 8 cycles)/fc
If this bit is set to 0 and the EOFSOFAdjust bit is logic 1 will result in
an incorrect system behavior in respect to ISO specification.
For the behaviour in version 1.0, see Section 21 “
logic 1. In this case, it specifies the register page (which is A5 and
A4of the register address).
9.2.3.2CRCResultReg
Shows the actual MSB and LSB values of the CRC calculation.
Note: The CRC is split into two 8-bit register.
Note: Setting the bit MSBFirst in ModeReg register reverses the bit order , the byte or der is
Selects the conductance for the N-driver of the antenna driver pins TX1 and TX2 wh en the
driver is switched off.
Table 84.GsNOffReg register (address 23h); rese t value: 88h, 10001000b
Access
Rights
Table 85.Description of GsNOffReg bits
BitSymbolDescription
7 to 4CWGsNOffThe value of this register defines the conductance of the output
3 to 0ModGsNOffThe value of this register defines the conductance of the output
PN512
Transm ission module
76543210
CWGsNOffModGsNOff
r/wr/wr/wr/wr/wr/wr/wr/w
N-driver during times of no modulation.
Note: The conductance value is binary weighted.
Note: During soft Power-down mode the highest bit is forced to 1.
Note: The value of the register is only used if the driver is switched
off. Otherwise the bit value CWGsNOn of register GsNOnReg is
used.
Note: This value is used for LoadModulation.
N-driver for the time of modulation. This may be used to regulate the
modulation index.
Note: The conductance value is binary weighted.
Note: During soft Power-down mode the highest bit is forced to 1.
Note: The value of the register is only used if the driver is switched
off. Otherwise the bit value ModGsNOn of register GsNOnReg is
used
7 to 0ModWidthThese bits define the width of the Miller modulation as initiator in Active
PN512
Transm ission module
76543210
ModWidth
r/wr/wr/wr/wr/wr/wr/wr/w
and Passive Communication mode as multiples of the carrier
frequency (ModWidth + 1/fc). The maximum value is half the bit
period.
Acting as a target in Passive Communication mode at 106 kbit or in
Card Operating mode for ISO/IEC 14443A/MIFARE these bits are
used to change the duty cycle of the subcarrier frequency.
The resulting number of carrier periods are calculated according to the
following formulas:
Adjust the bitphase at 106 kbit during transmission.
T able 88. TxBitPhaseReg register (address 25h); reset value: 87h, 10000111b
RcvClkChangeTxBitPhase
Access
Rights
Table 89.Description of TxBitPhaseReg bits
BitSymbolDescription
7RcvClkChangeSet to logic 1, the demodulator’s clock is derived by the external RF
6 to 0TxBitPhaseThese bits are representing the number of carrier frequency clock
76543210
r/wr/wr/wr/wr/wr/wr/wr/w
field.
cycles, which are added to the waiting period before transmitting
data in all communication modes. TXBitPhase is used to adjust the
TX bit synchronization during passive NFCIP-1 communication mode
at 106 kbit and in ISO/IEC 14443A/MIFARE card mode.
7RFLevelAmpSet to logic 1, this bit activates the RF level detectors’ amplifier.
6 to 4RxGainThis register defines the receivers signal voltage gain factor:
3 to 0RFLevelDefines the sensitivity of the RF level detector, for description see
PN512
Transm ission module
76543210
RFLevelAmpRxGainRFLevel
r/wr/wr/wr/wr/wr/wr/wr/w
ValueDescription
00018 dB
00123 dB
01018 dB
01123 dB
10033 dB
10138 dB
11043 dB
11148 dB
7 to 4CWGsNOnThe value of this register defines the conductance of the output
3 to 0ModGsNOnThe value of this register defines the conductance of the output
PN512
Transm ission module
76543210
CWGsNOnModGsNOn
r/wr/wr/wr/wr/wr/wr/wr/w
N-driver during times of no modulation. This may be used to regulate
the output power and subsequently current consumption and
operating distance.
Note: The conductance value is binary weighted.
Note: During soft Power-down mode the highest bit is forced to 1.
Note: This value is only used if the driver TX1 or TX2 are switched on.
Otherwise the value of the bits CWGsNOff of register GsNOffReg is
used.
N-driver for the time of modulation. This may be used to regulate the
modulation index.
Note: The conductance value is binary weighted.
Note: During soft Power-down mode the highest bit is forced to 1.
Note: This value is only used if the driver TX1 or Tx2 are switched on.
Otherwise the value of the bits ModsNOff of register GsNOffReg is
used.
9.2.3.8CWGsPReg
Defines the conductance of the P-driver during times of no modulation
P-driver. This may be used to regulate the output power and
subsequently current consumption and operating distance.
Note: The conductance value is binary weighted.
Note: During soft Power-down mode the highest bit is forced to 1.
Rev. 4.2 — 28 August 2012
111342 53 of 132
NXP Semiconductors
9.2.3.9ModGsPReg
Defines the driver P-output conductance during modulation.
Table 96.ModGsPReg register (address 29h); reset value: 20h, 00100000 b
Access
Rights
Table 97. Description of ModGsPReg bits
BitSymbolDescription
7 to 6-Reserved for future use.
5 to 0ModGsP
PN512
Transm ission module
76543210
00ModGsP
RFURFUr/wr/wr/wr/wr/wr/w
[1]
The value of this register defines the conductance of the output
P-driver for the time of modulation. This may be used to regulate the
modulation index.
Note: The conductance value is binary weighted.
Note: During soft Power-down mode the highest bit is forced to 1.
[1] If Force100ASK is set to logic 1, the value of ModGsP has no effect.
9.2.3.10TMode Register, TPrescaler Register
Defines settings for the timer.
Note: The Prescaler value is split into two 8-bit registers
7TAutoSet to logic 1, the timer starts automatically at the end of the transmission
r/wr/wr/wr/wr/wr/wr/wr/w
in all communication modes at all speeds or when bit InitialRFOn is set to
logic 1 and the RF field is switched on.
In mode MIFARE and ISO14443-B 106kbit/s the timer stops after the 5th
bit (1 startbit, 4 databits) if the bit RxMultiple in the register RxModeReg is
not set. In all other modes, the timer stops after the 4th bit if the bit
RxMultiple the register RxModeReg is not set.
If RxMultiple is set to logic 1, the timer never stops. In this case the timer
can be stopped by setting the bit TStopNow in register ControlReg to 1.
Set to logic 0 indicates, that the timer is not influ enced by the protocol.
7RS232LineEn Set to logic 0, the lines MX and DTRQ for the serial UART are
6 to 0TestPinEnEnables the pin output driver on the 8-bit parallel interface.
PN512
Transm ission module
76543210
RS232LineEnTestPinEn
r/wr/wr/wr/wr/wr/wr/wr/w
disabled.
Example:
Setting bit 0 to 1 enables D0
Setting bit 5 to 1 enables D5
Note: Only valid if one of serial interfaces is used.
If the SPI interface is used only D0 to D4 can be used. If the serial
UART interface is used and RS232LineEn is set to logic 1 only D0 to
D4 can be used.
9.2.4.5TestPinValueReg
Defines the values for the 7-bit parallel port when it is used as I/O.
7UseIOSet to logic 1, this bit enables the I/O functionality for the 7-bit parallel
6 to 0T estPinValueDefines the value of the 7-bit parallel port, when it is used as I/O. Each
r/wr/wr/wr/wr/wr/wr/wr/w
port in case one of the serial interfaces is used. The input/output
behavior is defined by TestPinEn in register TestPinEnReg. The value
for the output behavior is defined in the bits TestPinVal.
Note: If SAMClkD1 is set to logic 1, D1 can not be used as I/O.
output has to be enabled by the TestPinEn bits in register
TestPinEnReg.
Note: Reading the register indicates the actual status of the pins D6 D0 if UseIO is set to logic 1. If UseIO is set to logic 0, the value of the
register TestPinValueReg is read back.
T able 138. RFTReg register (address 3Eh); reset value: 03h, 00000011b
Access
Rights
Table 139. Description of RFTReg bits
BitSymbolDescription
7 to 0-Reserved for production tests.
10. Digital interfaces
10.1Automatic microcontroller interface detection
The PN512 supports direct interfacing of hosts using SPI, I2C-bus or serial UART
interfaces. The PN512 resets its interface and checks the current host interface type
automatically after performing a power-on or hard reset. The PN512 identifies the host
interface by sensing the logic levels on the control pins afte r the reset phase. This is done
using a combination of fixed pin connections. Table 140
configurations.
A serial peripheral interface (SPI compatible) is supported to enable high-speed
communication to the host. The interface can handle dat a speeds up to 10 Mbit/s. When
communicating with a host, the PN512 acts as a slave, receiving data from the external
host for register settings, sending and receiving data relevant for RF interface
communication.
An interface compatible with SPI enables high-speed serial communication between the
PN512 and a microcontroller. The implemented interface is in accordance with the SPI
standard.
PN512
Transm ission module
The timing specification is given in Section 26.1 on page 113
Fig 12. SPI connection to host
The PN512 acts as a slave during SPI communication. The SPI clock signal SCK must be
generated by the master. Data communication from the master to the slave uses the
MOSI line. The MISO line is used to send data from the PN512 to the master.
Data bytes on both MOSI and MISO lines are sent with the MSB first. Dat a on both M OSI
and MISO lines must be stable on the rising edge of the clock and can be changed on the
falling edge. Data is provided by the PN512 on the falling clock edge and is stable during
the rising clock edge.
10.2.1SPI read data
.
Reading data using SPI requires the byte order shown in Table 142 to be used. It is
possible to read out up to n-data bytes.
The first byte sent defines both the mode and the address.
possible to write up to n data bytes by only sending one address byte.
Rev. 4.2 — 28 August 2012
111342 67 of 132
NXP Semiconductors
001aan221
PN512
RX
RX
TX
TX
DTRQ
DTRQ
MX
MX
The first send byte defines both the mode and the address byte.
Table 143. MOSI and MISO byte order
LineByte 0Byte 1Byte 2ToByte nByte n + 1
MOSIaddress 0data 0data 1...data n 1data n
MISOX
[1] X = Do not care.
Remark: The MSB must be sent first.
10.2.3SPI address byte
The address byte has to meet the following format.
The MSB of the first byte defines the mode used. To read data from the PN512 the MSB is
set to logic 1. To write dat a to the PN512 the MSB must be set to logic 0. Bits 6 to 1 define
the address and the LSB is set to logic 0.
T able 144. Address byte 0 register; address MOSI
7 (MSB)6543210 (LSB)
1 = read
0 = write
PN512
Transm ission module
[1]
address0
[1]
X
[1]
X
...X
[1]
X
[1]
10.3UART interface
10.3.1Connection to a host
Fig 13. UART connection to microcontrollers
Remark: Signals DTRQ and MX can be disabled by clearing TestPinEnReg register’s
RS232LineEn bit.
10.3.2Selectable UART transfer speeds
The internal UART interface is compatible with an RS232 serial interface.
The default transfer speed is 9.6 kBd. To change the transfer speed, the host controller
must write a value for the new transfer speed to the SerialSpeedReg register. Bits
BR_T0[2:0] and BR_T1[4:0] define the facto rs for se ttin g th e tra n sfe r sp ee d in th e
SerialSpeed Reg register.
The BR_T0[2:0] and BR_T1[4:0] settings are described in Table 9
xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx x x x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xx xx xxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx x x
xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxx
Remark: The data byte can be sent directly after the address byte on pin RX.
Address byte: The address byte has to meet the following format:
Transmission module
PN512
NXP Semiconductors
001aan222
PN512
SDA
SCL
I2C
EA
ADR_[5:0]
PULL-UP
NETWORK
CONFIGURATION
WIRING
PULL-UP
NETWORK
MICROCONTROLLER
The MSB of the first byte sets the mode used. To read data from the PN512, the MSB is
set to logic 1. To write data to the PN512 the MSB is set to logic 0. Bit 6 is reserved for
future use, and bits 5 to 0 define the address; see Table 150
T able 150. Address byte 0 register; address MOSI
7 (MSB)6543210 (LSB)
1 = read
0 = write
10.4I2C Bus Interface
PN512
Transm ission module
.
reservedaddress
An I2C-bus (Inter-IC) interface is supported to enable a low-cost, low pin count serial bus
interface to the host. The I
NXP Semiconductors’ I
2
C-bus interface is implemented according to
2
C-bus interface specification, rev. 2.1, January 2000. The
interface can only act in Slave mode. Therefore the PN512 does not implement clock
generation or access arbitration.
Fig 16. I2C-bus interface
The PN512 can act either as a slave receiver or slave transmitter in Standard mode, Fast
mode and High-speed mode.
SDA is a bidirectional line connected to a positive supply voltage using a current sour ce or
a pull-up resistor . Both SDA and SCL lines ar e set HIGH when data is not transmitted. The
2
PN512 has a 3-state output stage to perform the wired-AND functio n. Data on the I
C-bus
can be transferred at data rates of up to 10 0 kBd in Standard mode, up to 400 kBd in Fast
mode or up to 3.4 Mbit/s in High-speed mode.
C-bus interface is selected, spike suppression is activated on lines SCL and SDA
2
C-bus interface specification.
See Table 170 on page 114
Rev. 4.2 — 28 August 2012
for timing requirements.
111342 72 of 132
NXP Semiconductors
mbc621
data line
stable;
data valid
change
of data
allowed
SDA
SCL
mbc622
SDA
SCL
P
STOP condition
SDA
SCL
S
START condition
10.4.1Data validity
Data on the SDA line must be stable during the HIGH clock period. The HIGH or LOW
state of the data line must only change when the clock signal on SCL is LOW.
Fig 17. Bit transfer on the I2C-bus
10.4.2START and STOP conditions
To manage the data transfer on the I2C-bus, unique START (S) and STOP (P) conditions
are defined.
PN512
Transm ission module
• A START condition is defined with a HIGH-to-LOW transition on the SDA line while
SCL is HIGH.
• A STOP condition is defined with a LOW-to-HIGH transition on the SDA line while
SCL is HIGH.
2
C-bus master always generates the START and STOP conditions. The bus is busy
The I
after the START condition. The bus is free again a certain time after the STOP condition.
The bus stays busy if a repeated START (Sr) is generated instead of a STOP condition.
The START (S) and repeated START (Sr) conditions are functionally identical. Therefore,
S is used as a generic term to represent both the START (S) and repeated START (Sr )
conditions.
Fig 18. START and STOP conditions
10.4.3Byte format
Each byte must be followed by an acknowledge bit. Data is transfer red with the M SB first;
see Figure 21
but must meet the read/write cycle format.
. The number of transmitted bytes during one data transfer is unrestricted
Rev. 4.2 — 28 August 2012
111342 73 of 132
NXP Semiconductors
mbc602
S
START
condition
9821
clock pulse for
acknowledgement
not acknowledge
acknowledge
data output
by transmitter
data output
by receiver
SCL from
master
msc608
Sr
or
P
SDA
Sr
P
SCL
STOP or
repeated START
condition
S
or
Sr
START or
repeated START
condition
123 - 89
ACK
9
ACK
7812
MSB
acknowledgement
signal from slave
byte complete,
interrupt within slave
clock line held LOW while
interrupts are serviced
acknowledgement
signal from receiver
10.4.4Acknowledge
An acknowledge must be sent at the end of one data byte. The acknowledge-related clock
pulse is generated by the master . Th e transmitter of dat a, either master or slave, releases
the SDA line (HIGH) during the acknowledge clock pulse. The receiver pulls down the
SDA line during the acknowledge clock pulse so that it remains stable LOW during the
HIGH period of this clock pulse.
The master can then generate either a STOP (P) condition to stop the transfer or a
repeated START (Sr) condition to start a new transfer.
A master-receiver indicates the end of data to the slave-transmitter by not generating an
acknowledge on the last byte that was clocked out by the slave. The slave-transmitter
releases the data line to allow the master to gener ate a ST OP (P) or repeated START (Sr)
condition.
During the I2C-bus address procedure, the first byte after the START condition is used to
determine which slave will be selected by the master.
PN512
Transm ission module
Several address numbers are reserved. During device configuration, the designer must
2
ensure that collisions with these reserved addresses cannot occur. Check the I
C-bus
specification for a complete list of reserved addresses.
2
C-bus address specification is dependent on the definition of pin EA. Immediately
The I
after releasing pin NRSTPD or after a power-o n reset, the device defines the I
2
C-bus
address according to pin EA.
If pin EA is set LOW, the upper 4 bits of the device bus address are reserved by
NXP Semiconductors and set to 0101b for all PN512 devices. The remaining 3 bits
(ADR_0, ADR_1, ADR_2) of the slave address can be freely configured by the customer
2
to prevent collisions with other I
C-bus devices.
If pin EA is set HIGH, ADR_0 to ADR_5 can be completely specified at the external pins
according to Table 140 on page 66
. ADR_6 is always set to logic 0.
In both modes, the external address coding is latched immediately after releasing the
reset condition. Further changes at the used pins are not taken into consideration.
2
Depending on the external wiring, the I
C-bus address pins can be used for test signal
outputs.
Fig 21. First byte following the START procedure
10.4.6Register write access
To write data from the host controll er using the I2C-bus to a specific register in the PN512
the following frame format must be used.
• The first byte of a frame indicates the device address according to the I
• The second byte indicates the register address followed by up to n-data bytes.
In one frame all data bytes are written to the same register address. This enables fast
FIFO buffer access. The Read/Write (R/W
optional, if the previous access was on the same register address
0
(W)
A
P
P
S
Sstart condition
Pstop condition
Aacknowledge
Anot acknowledge
Wwrite cycle
Rread cycle
A
I2C-BUS
SLAVE ADDRESS
[A7:A0]
sent by master
sent by slave
DATA
[7:0]
1
(R)
A
DATA
[7:0]
A
10.4.7Register read access
To read out data from a specific register address in the PN512, the host controller must
use the following procedure:
• Firstly, a write access to the specific register address must be per formed as indicate d
• The first byte of a frame indicates the device address according to the I
• The second byte indicates the register address. No data bytes are added
• The Read/Write bit is 0
After the write access, read access can start. The host sends the device address of the
PN512. In response, the PN512 sends the content of the read access register. In one
frame all data bytes can be read from the same register address. This enables fast FIFO
buffer access or register polling.
In High-speed mode (HS mode), the device can transfer information at data rates of up to
3.4 Mbit/s, while remaining fully downward-compatible with Fast or Standard mode
(F/S mode) for bidirectional communication in a mixed-speed bus system.
10.4.9High-speed transfer
To achieve data rates of up to 3.4 Mbit/s the following improvements have been made to
2
I
C-bus operation.
• The inputs of the device in HS mode incorporate spike suppression, a Schmitt trigger
• The output buffers of the device in HS mode incorporate slope control of the falling
10.4.10Serial data transfer format in HS mode
The HS mode serial data transfer format meets the Standard mode I2C-bus specification.
HS mode can only start after all of the following conditions (all of which are in F/S mode ):
PN512
Transm ission module
on the SDA and SCL inputs and diff erent timing constants when compared to
F/S m ode
edges of the SDA and SCL signals with different fall times compared to F/S mode
1. START condition (S)
2. 8-bit master code (00001XXXb)
3. Not-acknowledge bit (A
)
When HS mode starts, the active master sends a r epeated STAR T condition (Sr) followed
by a 7-bit slave address with a R/W bit addr ess and receives an a cknowled ge bit (A) fr om
the selected PN512.
Data transfer continues in HS mode after the next repeated START (Sr), only switching
back to F/S mode after a ST OP condition (P). To reduce the overhead of the master code,
a master links a number of HS mode transfers, separated by repeated START conditions
(Sr).
After reset and initialization, the PN512 is in Fast mode (which is in effect F/S mode as
Fast mode is downward-compatible with Standard mode). The connected PN512
recognizes the “S 00001XXX A” sequence and switches its internal circuitry from the Fast
mode setting to the HS mode setting.
The following actions are taken:
1. Adapt the SDA and SCL input filters according to the spike suppression requirement
2. Adapt the slope control of the SDA output stages.
It is possible for system configurations that do not have other I
the communication to switch to HS mode permanently. This is implemented by setting
Status2Reg register’s I
is not required to be sent. This is not defined in the specification and must only be used
when no other devices are connected on the bus. In addition, spikes on the I
must be avoided because of the reduced spike suppression.
in HS mode.
PN512
Transm ission module
2
C-bus devices involved in
2
CForceHS bit to logic 1. In permanent HS mode, the master code
2
C-bus lines
10.4.12PN512 at lower speed modes
PN512 is fully downward-compatible and can be connected to an F/S mode I2C-bus
system. The device stays in F/S mode and communicates at F/S mode speeds because a
master code is not transmitted in this configuration.
11. 8-bit parallel interface
The PN512 supports two different types of 8-bit parallel interfaces, Intel and Motorola
compatible modes.
11.1Overview of supported host controller interfaces
The PN512 supports direct interfacing to various -Controlle rs. The follo wing t abl e shows
the parallel interface types supported by the PN512.
Table 151. Supported interface types
Supported interface typesBusSeparated Address and
Separated Read and Write
Strobes (INTEL compatible)
Multiplexed Read and Write
Strobe (Motorola compatible)
Fig 25. Connection to host controller with separated Read/Write strobes
For timing requirements refer to Section 26.2 “8-bit parallel interface timing”.
11.3Common Read/Write strobe
Fig 26. Connection to host controller with common Read/Write strobes
For timing requirements refer to Section 26.2 “8-bit parallel interface timing”
Rev. 4.2 — 28 August 2012
111342 80 of 132
NXP Semiconductors
12. Analog interface and contactless UART
12.1General
The integrated contactless UART supports the external host online with framing and error
checking of the protocol requirements up to 84 8 kBd. An external circuit can be connected
to the communication interface pins MFIN and MFOUT to modulate and demodulate the
data.
The contactless UART handles the protocol requir ements for the communication
protocols in cooperation with the host. Protocol handling generates bit and byte-oriented
framing. In addition, it handles error detection such as parity and CRC, based on the
various supported contactless communication protocols.
Remark: The size and tuning of the antenna and the power supply voltage have an
important impact on the achievable operating distance.
12.2TX driver
The signal on pins TX1 and TX2 is the 13.56 MHz energy carrier modulated by an
envelope signal. It can be used to drive an antenna directly using a few passive
components for matching and filtering; see Section 15 on page 93
and TX2 can be configured using the TxControlReg register; see Section 9.2.2.5 on
page 37.
PN512
Transm ission module
. The signal on pins TX1
The modulation index can be set by adjusting the impedance of the drivers. The
impedance of the p-driver can be configured using registers CWGsPReg and
ModGsPReg. The impedance of the n-driver can be configured using the GsNReg
register. The modulation index also depends on the antenna design and tuning.
The TxModeReg and TxSelReg registers control the data rate and framing during
transmission and the antenna driver setting to support the different requirements at the
different modes and transfer speeds.
Table 152. Register and bit settings controlling the signal on pin TX1
Table 153. Register and bit settings controlling the signal on pin TX2
Bit
Tx1RFEn
Bit
Force
Bit
Tx2CW
Bit
InvTx2RFOn
Bit
InvTx2RFOff
Envelope Pin
100ASK
0X
[1]
1000X
[1]
X
[1]
X
[1]
X
[1]
[1]
X
0RFpModnMod1RFpCWnCW
1X
[1]
0RF_npModnMod
1RF_npCWnCW
10X
1X
100X
[1]
[1]
[1]
[1]
X
[1]
X
00pModnMod100 % ASK: pin
1RFpCWnCW
1X
[1]
00pModnMod
1RF_npCWnCW
[1] X = Do not care.
10X
1X
[1]
[1]
[1]
X
[1]
X
GSPMos GSNMos Remarks
TX2
[1]
X
[1]
X
[1]
X
not specified if
RF is switched
off
RFpCWnCWconductance
RF_npCWnCW
always CW for
the Tx2CW bit
TX2 pulled
to logic 0
(independent of
the
RFpCWnCW
InvTx2RFOn/Inv
Tx2RFOff bits)
RF_npCWnCW
The following abbreviations have been used in Table 152 and Table 153:
• RF: 13.56 MHz clock derived from 27.12 MHz quartz crystal oscillator divided by 2
• RF_n: inverted 13.56 MHz clock
• GSPMos: conductance, configuration of the PMOS array
• GSNMos: conductance, configuration of the NMOS array
• pCW: PMOS conductance value for continuous wave defin ed by the CWGsPReg
register
• pMod: PMOS conductance value for modulation defined by the ModGsPReg register
• nCW: NMOS conductance value for continuous wave defined by the GsNReg
register’s CWGsN[3:0] bits
• nMod: NMOS conductance value for modulation defined by the GsNReg register’s
ModGsN[3:0] bits
• X = do not care.
Remark: If only one driver is switched on, the values for CWGsPReg, ModGsPReg and
GsNReg registers are used for both drivers.
12.3RF level detector
The RF level detector is integrated to fulfill NFCIP1 protocol requirements (e.g. RF
collision avoidance). Furthermore the RF level detector can be used to wake up the
PN512 and to generate an interrupt.
The sensitivity of the RF level detector is adjustable in a 4-bit range using the bits RFLevel
in register RFCfgReg. The sensitivity itself depends on the antenna configuration and
tuning.
PN512
Transm ission module
Possible sensitivity levels at the RX pin are listed in the Table 153
Table 154. Setting of the bits RFlevel in register RFCfgReg (RFLevel amplifier deactivated)
To increase the sensitivity of the RF level detector an amplifier can be activated by setting
the bit RFLevelAmp in register RFCfgReg to 1.
Remark: During soft Power-down mode the RF level detector amplifier is automatically
switched off to ensure that the power consumption is less than 10 Aat3V.
Remark: With typical antennas lower sensitivity levels can provoke misleading resu lts
because of intrinsic noise in the environment.
Note: It is recommended to use the bit RFLevelAmp only with higher RF level settings.
12.4Data mode detector
The Data mode detector gives the possibility to detect received signals according to the
ISO/IEC 14443A/MIFARE, FeliCa or NFCIP-1 schemes at the standard transfer speeds
for 106 kbit, 212 kbit and 424 kbit in order to prepare the internal receiver in a fast and
convenient way for further data processing.
The Data mode detector can only be activated by the AutoColl command. The mode
detector resets, when no external RF field is detected by the RF level detector. The Data
mode detector could be switched off during the AutoColl command by setting bit
ModeDetOff in register ModeReg to 1.
to driver TX1 and TX2
0 = impedance = modulated
1 = impedance = CW
1
INVERT IF
PolMFin = 0
MFIN
envelope
12.5Serial data switch
Two main bloc ks are implemented in the PN512. The digital block comprises the state
machines, encoder/decoder logic. The analog block comprises the modulator and
antenna drivers, the receiver and amplifiers. The interface between these two blocks can
be configured in the way, that the interfacing signals may be routed to the pins SIGIN and
SIGOUT. SIGIN is capable of processing digital NFC signals on transfer speeds above
424 kbit. The SIGOUT pin can provide a digital signal that can be used with an additional
external circuit to generate transfer speeds above 424 kbit (including 106, 212 and
424 kbit). Furthermore SIGOUT and SIGIN can be used to enable the S
card SAM mode to emulate a card functionality with the PN512 and a secu re IC. A secure
IC can be the SmartMX smart card controller IC.
This topology allows the analog block of the PN512 to be connected to the digi t al block of
another device.
The serial signal switch is controlled by the TxSelReg and RxSelReg registers.
PN512
Transm ission module
2
C interface in the
Figure 28
shows the serial data switch for TX1 and TX2.
Fig 28. Serial data switch for TX1 and TX2
12.6S2C interface support
The S2C provides the possibility to directly connect a secure IC to the PN512 in order act
as a contactless smart card IC via the PN512. The inter facing signals can be routed to the
pins SIGIN and SIGOUT. SIGIN can receive either a digital FeliCa or digitized
ISO/IEC 14443A signal sent by the secure IC. The SIGOUT pin can provide a digital
signal and a clock to communicate to the secure IC. A secure IC can be the smart card IC
provided by NXP Semiconductors.
The PN512 has an extra supply pin (SVDD and PVSS as Ground line) for the SIGIN and
SIGOUT pads.
outlines possible ways of communications via the PN512 to the secure IC.
Rev. 4.2 — 28 August 2012
111342 85 of 132
NXP Semiconductors
001aan226
CONTACTLESS UART
SERIAL SIGNAL SWITCH
FIFO AND STATE MACHINE
SPI, I
2
C, SERIAL UART
HOST CONTROLLER
PN512
SECURE CORE IC
SIGOUT
SIGIN
2. contactless
card mode
1. secure access
module (SAM) mode
Fig 29. Communication flows using the S2C interface
PN512
Transm ission module
Configured in the Secure Access Mode the host controller can directly communicate to
the Secure IC via SIGIN/SIGOUT. In this mode the PN512 generates the RF clock and
performs the communication on the SIGOUT line. To enable the Secure Access module
mode the clock has to be derived by the internal oscillator of the PN512, see bits
SAMClockSel in register TestSel1Reg.
Configured in Contactless Card mode the secure IC can act as conta ctless smart card IC
via the PN512. In this mode the signal on the SIGOUT line is p rovid ed by the extern al RF
field of the external reader/writer. To enable the Contactless Card mode the clock derived
by the external RF field has to be used.
2
The configuration of the S
C interface differs for the FeliCa and MIFARE scheme as
12.6.1Signal shape for Felica S2C interface support
The FeliCa secure IC is connected to the PN512 via the pins SIGOUT and SIGIN.
The signal at SIGOUT contains the information of the 13.56 MHz clock and the digitized
demodulated signal. The clock and the demodulated signal is combined by using the
logical function exclusive or.
To ensure that this signal is free of spikes, the demodulated signal is digitally filtere d first.
The time delay for that digital filtering is in the range of one bit length. The demodulated
signal changes only at a positive edge of the clock.
The register TxSelReg controls the setting at SIGOUT.
PN512
Transm ission module
Fig 30. Signal shape for SIGOUT in FeliCa card SAM mode
The answer of the FeliCa SAM is transferred from SIGIN directly to the antenna driver.
The modulation is done according to the register settings of the antenna drivers.
The clock is switched to AUX1 or AUX2 (see AnalogSelAux).
Note: A HIGH signal on AUX1 and AUX2 has the same level as AVDD. A HIGH signal at
SIGOUT has the same level as SVDD. Alternatively it is possible to use pin D0 as clock
output if a serial interface is used. The HIGH level at D0 is the same as PVDD.
Fig 31. Signal shape for SIGIN in SAM mode
Note: The signal on the antenna is shown in principle only. In reality the waveform is
sinusoidal.
12.6.2Waveform shape for ISO/IEC 14443A and MIFARE S2C support
The secure IC, e.g. the SmartMX is connected to the PN512 via the pins SIGOUT and
SIGIN.
The waveform shape at SIGOUT is a digital 13.56 MHz Miller coded signal with levels
between PVSS and PVDD derived out of the external 13.56 MHz carrier signal in case of
the Contactless Card mode or internally generated in terms of Secure Access mode.
The register TxSelReg controls the setting at SIGOUT.
Note: The clock settings for the Secure Access mode and the Contactless Card mode
differ, refer to the description of the bits SAMClockSel in register TestSel1Reg.
PN512
Transm ission module
Fig 32. Signal shape for SIGOUT in MIFARE Card SAM mode
The signal at SIGIN is a digital Manchester coded signal according to the requirement s of
the ISO/IEC 14443A with the subcarrier frequency of 847.5 kHz generated by the secure
IC.
Fig 33. Signal shape for SIGIN in MIFARE Card SAM mode
12.7.1Polling sequence functionality for initiator
1. Timer: The PN512 has a timer, which can be programmed in a way that it generates
2. The receiver can be configured in a way to receive continuously. In this mode it can
3. The internal UART adds one byte to the end of every received packet, before it is
4. The length of one packet is 18 or 20 bytes (+ 1 byte Error-Info). The FIFO has a
PN512
Transm ission module
an interrupt at the end of each timeslot, or if required an interrupt is generated at the
end of the last timeslot.
receive any number of packets. The receiver is ready to receive the next packet
directly after the last packet has been received. This mode is active by setting the bit
RxMultiple in register RxModeReg to 1 and has to be stopped by software.
transferred into the FIFO-buffer. This byte indicates if the received byte packet is
correct (see register ErrReg). The first byte of each packet contains the length byte of
the packet.
length of 64 bytes. This means three packets can be stored in the FIFO at the same
time. If more than three packets are expected, the host controller has to empty the
FIFO, before the FIFO is filled completely . In case of a FIFO-overflow data is lost (See
bit BufferOvfl in register ErrorReg).
12.7.2Polling sequence functionality for target
1. The host controller has to configure the PN512 with the correct polling response
parameters for the polling command.
2. To activate the automatic polling in Target mode, the AutoColl Command has to be
activated.
3. The PN512 receives the polling command send out by an initiator and answers with
the polling response. The timeslot is selected automatically (The timeslot itself is
randomly generated, but in the range 0 to TSN, which is defined by the Polling
command). The PN512 compares the system code, stored in byte 17 and 18 of the
Config Command with the system code received by the polling command of an
initiator. If the system code is equal, the PN512 answers according to the configured
polling response. The system code FF (hex) acts as a wildcard for the system code
bytes, i.e. a target of a system code 1234 (hex) answers to the polling command with
one of the following system codes 1234 (hex), 12FF (hex), FF34 (hex) or FFFF (hex).
If the system code does not match no answer is sent back by the PN512.
If a valid command is received by the PN512, which is not a Polling command, no
answer is sent back and the command AutoColl is stopped. The received packet is
stored in the FIFO.
12.7.3Additional hardware support for FeliCa and NFC
Additionally to the polling sequence support for the Felica mode, the PN512 supports the
check of the Len-byte.
The received Len-byte in accordance to the registers FelNFC1Reg and FelNFC2Reg:
DataLenMin in register FelNFC1Reg defines the minimum length of the accepted packet
length. This register is six bit long. Each bit represents a length of four bytes.
DataLenMax in register FelNFC2Reg defines the maximum length of the accepted
package. This register is six bit long. Each bit represents a length of four bytes. If set to
logic 1 this limit is ignored. If the length is not in the supposed range, the packet is not
transferred to the FIFO and receiving is kept active.
Example 1:
• DataLenMin = 4
• DataLenMax = 5
PN512
Transm ission module
– The length shall be greater or equal 16.
– The length shall be smaller than 20. Valid area: 16, 17, 18, 19
Example 2:
• DataLenMin = 9
– The length shall be greater or equal 36.
• DataLenMax = 0
– The length shall be smaller than 256. Valid area: 36 to 255
12.7.4CRC coprocessor
The following CRC coprocessor parameters can be configured:
• The CRC preset value can be either 0000h, 6363h, A671h or FFFFh depending on
the ModeReg register’s CRCPreset[1:0] bits setting
• The CRC polynomial for the 16-bit CRC is fixed to x
• The CRCResultReg register indicates the result of the CRC calculation. This register
is split into two 8-bit registers representing the higher and lower bytes.
• The ModeReg register’s MSBFirst bit indicates that data will be loaded with the MSB
first.
Table 155. CRC coprocessor parameters
ParameterValue
CRC register length16-bit CRC
CRC algorithmalgorithm according to ISO/IEC 14443 A and ITU-T
CRC preset value0000h, 6363h, A671h or FFFFh depending on the setting of the
An 8 64 bit FIFO buffer is used in the PN512. It buffers the inpu t and output dat a stream
between the host and the PN512’s internal state machine. This makes it possible to
manage data streams up to 64 bytes long without the need to take timing constraints into
account.
13.1Accessing the FIFO buffer
The FIFO buffer input and output data bus is connected to the FIFODataReg register.
Writing to this register stores one byte in the FIFO buffer and increments the internal FIFO
buffer write pointer. Reading from this register shows the FIFO buffer contents stored in
the FIFO buffer read pointer and decrements the FIFO buffer read pointer. The distance
between the write and read pointer can be obtained by reading the FIFOLevelReg
register.
When the microcontroller starts a command, the PN512 can, while the command is in
progress, access the FIFO buffer according to that command. Only one FIFO buffer has
been implemented which can be used for input and output. The microcontroller must
ensure that there are not any unintentional FIFO buffer accesses.
PN512
Transm ission module
13.2Controlling the FIFO buffer
The FIFO buffer pointers can be reset by setting FIFOLevelReg register’s FlushBuffer bit
to logic 1. Consequently, the FIFOLevel[6:0] bits are all set to logic 0 and the ErrorReg
register’s BufferOvfl bit is cleared. The bytes stored in the FIFO buffer are no longer
accessible allowing the FIFO buffer to be filled with another 64 bytes.
13.3FIFO buffer status information
The host can get the following FIFO buffer status information:
• Number of bytes stored in the FIFO buffer: FIFOLevelReg register’s FIFOLevel[6:0]
• FIFO buffer almost full warning: Status1Reg register’s HiAlert bit
• FIFO buffer almost empty warning: Status1Reg register’s LoAlert bit
• FIFO buffer overflow warning: ErrorReg register’s BufferOvfl bit. The BufferOvfl bit
can only be cleared by setting the FIFOLevelReg register’s FlushBuffer bit.
The PN512 can generate an interrupt signal when:
• ComIEnReg register’s LoAlertIEn bit is set to logic 1. It activates pin IRQ when
Status1Reg re gister’s LoAlert bit changes to logic 1.
• ComIEnReg register’s HiAlertIEn bit is set to logic 1. It activates pin IRQ when
Status1Reg register’s HiAlert bit changes to logic 1.
If the maximum number of WaterLevel bytes (as set in the W ate rLevelReg register) or less
are stored in the FIFO buffer, the HiAlert bit is set to logic 1. It is generated according to
If the number of WaterLevel bytes (as set in the WaterLevelReg register) or less are
stored in the FIFO buffer, the LoAlert bit is set to logic 1. It is generated according to
Equation 4
:
14. Interrupt request system
The PN512 indicates certain events by setting the Status1Reg register’s IRq bit and, if
activated, by pin IRQ. The signal on pin IRQ can be used to interrupt the host using its
interrupt handling capabilities. This allows the implementation of efficient host software.
14.1Interrupt sources overview
Table 156 shows the available interrupt bits, the corresponding source and the condition
for its activation. The ComIrqReg register’s T imerIRq interrupt bit in dicates an interrupt set
by the timer unit which is set when the timer decrements from 1 to 0.
The ComIrqReg register’s TxIRq bit indicates that the transmitter has finished. If the state
changes from sending data to transmitting the end of the frame pattern, the transmitter
unit automatically sets the interrupt bit. The CRC coprocessor sets the DivIrqReg
register’s CRCIRq bit after processing all the FIFO buffer data which is indicated by
CRCReady bit = 1.
PN512
Transm ission module
(4)
The ComIrqReg register’s RxIRq bit indicates an interrupt when the end of the received
data is detected. The ComIrqReg register’s IdleIRq bit is set if a command finishes and
the Command[3:0] value in the CommandReg register changes to idle (see Table 157 on
page 98).
The ComIrqReg register’s HiAlertIRq bit is set to logic 1 when the Status1Reg register’s
HiAlert bit is set to logic 1 which means that the FIFO buffer has reached the level
indicated by the WaterLevel[5:0] bits.
The ComIrqReg register’s LoAlertIRq bit is set to logic 1 when the Status1Reg register’s
LoAlert bit is set to logic 1 which means that the FIFO buffer has reached the level
indicated by the WaterLevel[5:0] bits.
The ComIrqReg register’s ErrIRq bit indicates an error detected by the contactless UART
during send or receive. This is indicated when any bit is set to logic 1 in register ErrorReg.
Table 156. Interrupt sources
Interrupt flagInterrupt sourceTrigger action
TimerIRqtimer unitthe timer counts from 1 to 0
TxIRqtransmittera transmitted data stream ends
CRCIRqCRC coprocessorall data from the FIFO buffer has been processed
RxIRqreceivera received data stream ends
IdleIRqComIrqReg registercommand execution finishes
HiAlertIRqFIFO bufferthe FIFO buffer is almost full
LoAlertIRqFIFO bufferthe FIFO buffer is almost empty
ErrIRqcontactless UARTan error is detected
A timer unit is implemented in the PN512. The external host controller may use this timer
to manage timing relevant tasks. The timer unit may be used in one of the following
configurations:
• Time-out counter
• Watch-dog counter
• Stop watch
• Programmable one-shot
• Periodical trigger
The timer unit can be used to measure the time interval between two events or to indicate
that a specific event occurred after a specific time. The timer can be triggered by events
which will be explained in the following, but the timer itself does not influence any internal
event (e.g. A time-out during data reception does not influence the reception process
automatically). Furthermore, several timer related bits are set and these bits can be used
to generate an interrupt.
PN512
Transm ission module
Timer
The timer has an input clock of 13.56 MHz (derived from the 27.12 MHz quartz). The timer
consists of two stages: 1 prescaler and 1 counter.
The prescaler is a 12-bit counte r . Th e reload value for TPrescaler can be defined be tween
0 and 4095 in register TModeReg and TPrescalerReg.
The reload value for the counter is defined by 16 bits in a range of 0 to 65535 in the
register TReloadReg.
The current value of the timer is indicated by the register TCounterValReg.
If the counter reaches 0 an interrupt will be generated automatically indicated by setting
the TimerIRq bit in the register CommonIRqReg. If enabled, this e vent can be indicated o n
the IRQ line. The bit TimerIRq can be set and reset by the host controller. Depend ing on
the configuration the timer will stop at 0 or restart with the value from register
TReloadReg.
The status of the timer is indicated by bit TRunning in register Status1Reg.
The timer can be manually started by TStartNow in register ControlReg or manually
stopped by TStopNow in register Control Reg.
Furthermore the timer can be activated automatically by setting the bit TAuto in the
register TModeReg to fulfill dedicated protocol requirements automatically.
The time delay of a timer stage is the reload value +1.
The definition of total time is: t = ((TPrescaler*2+1)*TReload+1)/13.56MHz or if
TPrescaleEven bit is set: t = ((TPrescaler*2+2)*TReload+1)/13.56MHz
Maximum time: TPrescaler = 4095,TReloadVal = 65535
To indicate 25 us it is required to count 339 clock cycles. This means the value for
TPrescaler has to be set to TPrescaler = 169.The timer has now an input clock of 25 us.
The timer can count up to 65535 timeslots of each 25 s. For the behaviour in version
Hard power-down is enabled when pin NRSTPD is LOW. This turns off all internal current
sinks including the oscillator. All digital input buf fers are sep arated from the input pins and
clamped internally (except pin NRSTPD). The output pins are frozen at either a HIGH or
LOW level.
16.2Soft power-down mode
Soft Power-down mode is entered immediately after the CommandReg register’s
PowerDown bit is set to logic 1. All internal current sinks are switched off, including the
oscillator buffer. However, the digital input buffers are not separated from the input pins
and keep their functionality. The digital output pins do not change their state.
During soft power-down, all register values, the FIFO buffer content and the configuration
keep their current contents.
After setting the PowerDown bit to logic 0, it takes 1024 clocks until the Soft power-down
mode is exited indicated by the PowerDown bit. Setting it to logic0 does not immediately
clear it. It is cleared automatically by the PN512 when Soft power-down mode is exited.
PN512
Transm ission module
Remark: If the internal oscillator is used, you must take into account that it is supplied by
pin AVDD and it will take a certain time (t
cycles can be detected by the internal logic. It is recommended for the serial UART, to first
send the value 55h to the PN512. The oscillator must be stable for further access to the
registers. To ensure this, perform a read access to address 0 until the PN512 answers to
the last read command with the register content of address 0. This indicates that the
PN512 is ready.
16.3Transmitter power-down mode
The Transmitter Power-down mode switches off the internal antenna drivers thereby,
turning off the RF field. Transmitter power-down mode is entered by setting either the
TxControlReg register’s Tx1RFEn bit or Tx2RFEn bit to logic 0.
The clock applied to the PN512 provides a time basis for the synchronous system’s
encoder and decoder. The stability of the clock frequency, therefore, is an important factor
for correct operation. To obtain optimum performance, clock jitter must be reduced as
much as possible. This is best achieved using the internal oscillator buffer with the
recommended circuitry.
PN512
Transm ission module
If an external clock source is used, the clock signal must be applied to pin OSCIN. In this
case, special care must be taken with the clock duty cycle and clock jitter and the clock
quality must be verified.
18. Reset and oscillator start-up time
18.1Reset timing requirements
The reset signal is filtered by a hysteresis circuit and a spike filter before it enters the
digital circuit. The spike filter rejects signals shorter than 10 ns. In order to perform a reset,
the signal must be LOW for at least 100 ns.
18.2Oscillator start-up time
If the PN512 has been set to a Power-down mode or is powered by a V
start-up time for the PN512 depends on the oscillator used and is shown in Figure 35
The time (t
start-up time is defined by the crystal.
The time (t
the PN512 can be addressed.
The delay time is calculated by:
) is the start-up time of the crystal oscillator circuit. The crystal oscillator
startup
) is the internal delay time of the PN512 when the clock signal is stab le before
The PN512 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 157
CommandReg register.
PN512
Transm ission module
) to the
Arguments and/or data necessary to pro cess a command are exchanged via the FIFO
buffer.
19.1General description
The PN512 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 157
CommandReg register.
Arguments and/or data necessary to pro cess a command are exchanged via the FIFO
buffer.
19.2General 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 St artSend 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 star t. 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.
Idle0000no action, cancels current command execution
Configure0001Configures th e PN512 for FeliCa, MIFARE and NFCIP-1
Generate RandomID0010generates a 10-byte random ID number
CalcCRC0011activates the CRC coprocessor or performs a self test
Transmit0100transmits data from the FIFO buffer
NoCmdChange0111no command change, can be used to modify the
Receive1000activates the receiver circuits
Transceive1100transmits data from FIFO buffer to antenna and automatically
AutoColl1101Handles FeliCa polling (Card Operation mode only) and
MFAuthent1110performs the MIFARE standard authentication as a reader
SoftReset1111resets the PN512
PN512
Transm ission module
Action
code
communication
CommandReg register bits without affecting the command,
for example, the PowerDown bit
activates the receiver after transmission
MIFARE anticollision (Card Operation mode only)
19.3.1PN512 command descriptions
19.3.1.1 Idle
Places the PN512 in Idle mode. The Idle command also terminates itself.
19.3.1.2Config command
To use the automatic MIFARE Anticollision, FeliCa Polling and NFCID3 the data used for
these transactions has to be stored internally. All the following data have to be written to
the FIFO in this order:
SENS_RES (2 bytes); in order byte 0, byte 1
NFCID1 (3 Bytes); in order byte 0, byte 1, byte 2; the first NFCID1 byte is fixed to 08h an d
the check byte is calculated automatically.
SEL_RES (1 Byte)
polling response (2 bytes (shall be 01h, FEh) + 6 bytes NFCID2 + 8 bytes Pad + 2 bytes
system code)
NFCID3 (1 byte)
In total 25 bytes are transferred into an internal buffer.
The complete NFCID3 is 10 bytes long and consists of the 3 NFCID1 bytes, the 6 NFCID2
bytes and the one NFCID3 byte which are listed above.
To read out this configuration the command Config with an empty FIFO-buffer has to be
started. In this case the 25 bytes are transferred from the internal buffer to the FIFO.
The PN512 has to be configured after each power up, before using the automatic
Anticollision/Polling function (AutoColl command). During a hard power down (reset pin)
this configuration remains unchanged.
This command terminates automatically when finished and the active command is idle.
19.3.1.3Generate RandomID
This command generates a 10-byte random number which is initially stored in the inter nal
buffer. This then overwrites the 10 bytes in the internal 25-byte buffer. This command
automatically terminates when finished and the PN512 returns to Idle mode.
19.3.1.4CalcCRC
The FIFO buffer content is transferred to the CRC coprocessor and the CRC calcu lation is
started. The calculation result is stored in the CRCResultReg register. The CRC
calculation is not limited to a dedicated number of bytes. The calculation is not stopped
when the FIFO buffer is empty during the data stream. The next byte wr itten to the FIFO
buffer is added to the calculation.
The CRC preset value is controlled by the ModeReg register’s CRCPreset[1:0] bits. The
value is loaded in to the CRC coprocessor when the command starts.
PN512
Transm ission module
This command must be terminated by writing a command to the CommandReg register,
such as, the Idle command.
If the AutoTestReg register’s SelfTest[3:0] bits are set correctly, the PN512 enters Self
Test mode. Starting the CalcCRC command initiates a digital self test. The result of the
self test is written to the FIFO buffer.
19.3.1.5 Transmit
The FIFO buffer content is immediately transmitted after starting this command. Before
transmitting the FIFO buffer content, all relevant registers must be set for data
transmission.
This command automatically terminates when the FIFO buffer is empty. It can be
terminated by another command written to the CommandReg register.
19.3.1.6NoCmdChange
This command does not influence any running command in the CommandReg register. It
can be used to manipulate any bit except the CommandReg register Command[3:0] bits,
for example, the RcvOff bit or the PowerDown bit.
19.3.1.7Receive
The PN512 activates the receiver path and waits for a data stream to be received. The
correct settings must be chosen before starting this command.
This command automatically terminates when the data stream ends. This is indicated
either by the end of frame pattern or by the length byte depending on the selected frame
type and speed.
Remark: If the RxModeReg register’s RxMultiple bit is set to logic 1, the Receive
command will not automatically terminate. It must be terminated by starting another
command in the CommandReg register.
This command continuously repeats the transmission of data from the FIFO buffer a nd the
reception of data from the RF field. The first action is transmit and after transmission the
command is changed to receive a data stream.
Each transmit process must be started by setting the BitFramingReg register’s StartSend
bit to logic 1. This command must be cleared by writing any command to the
CommandReg register.
Remark: If the RxModeReg register’s RxMultiple bit is set to logic 1, the Transceive
command never leaves the receive state because this state cannot be cancelled
automatically.
19.3.1.9AutoColl
This command automatically handles the MIFARE activation and the FeliCa polling in the
Card Operation mode. The bit Initiator in the register ControlReg has to be set to logic 0
for correct operation. During this command also the mode detector is active if not
deactivated by setting the bit ModeDetOff in the ModeReg register. After the mode
detector detects a mode, all the mode dependent registers are set according to the
received data. In case of no external RF field the command resets the internal state
machine and returns to the initial state but it will not be terminated. When the command
terminates the transceive command gets active.
PN512
Transm ission module
During protocol processing the IRQ bits are not supported. Only the last received frame
will serve the IRQ’s. The treatment of the TxCRCEn and RxCRCEn bits is different to the
protocol. During ISO/IEC 14443A activation the enable bits are defined by the comm and
AutoColl. The changes cannot be observed at the register TXMod eReg and RXModeReg.
After the Transceive command is active, the value of the register bit is relevant.
The FIFO will also receive the two CRC check bytes of the last command even if they
already checked and correct, if the state machine (Anticollision and Select routine) has to
not been executed and 106 kbit is detected.
During Felica activation the register bit is always relevant and is not overruled by the
command settings. This command can be cleared by software by writing any other
command to the CommandReg register, e.g. the idle command. W riting the same conten t
again to the CommandReg register resets the state machine.