User manual

NXP Semiconductors
UM10663
NXP Reader Library User Manual
UM10663
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2013. All rights reserved.
User Manual
COMPANY PUBLIC
Rev. 1.224 July 2013
257412
26 of 47
*pSak: pointer to one byte SAK. byte code specifying type of card. MIFARE card type is
determined by bits according to table of SAK values in [26].
*pMoreCardsAvailable: indicates whether one or more cards are in range of PCD field
at the same time. But still only one card’ UID is captured in one function run.
PH_ON
: more cards available. Collision occurred.
PH_OFF
: just one card in PCD field.
returnValues:
PH_ERR_INVALID_PARAMETER
:
bLenUidIn
does not equal any of 0, 3, 7 or 10.
PH_ERR_SUCCESS
- operation successful.
Other: depending on implementation and underlaying component.
2.3.5 Anticollision
- phpalI14443p3a_Anticollision()
This function is responsible for handling just one card during Activation procedure in case
more cards are present in the PCD field. Anti-collision routine performs 1 or 3 loops
depending on card currently activating, until complete UID acquired. The Anti-collision
procedure is mandatory for ISO/IEC 14443A compliant products and all the NXP
MIFARE products support the Anti-collision to ISO/IEC14443A.
phStatus_t phpalI14443p3a_Anticollision(
void * pDataParams, [In]
uint8_t bCascadeLevel, [In]
uint8_t * pUidIn, [In]
uint8_t bNvbUidIn, [In]
uint8_t * pUidOut, [Out]
uint8_t * pNvbUidOut ); [Out]
*pDataParams: pointer to the PAL layer data parameter structure. Function handles
some UID related variables.
bCascadeLevel: number of sub-loop which Anti-collision procedure is currently in. For
this parameter there are three legal values in total:
#define PHPAL_I14443P3A_CASCADE_LEVEL_1 0x93
#define PHPAL_I14443P3A_CASCADE_LEVEL_2 0x95
#define PHPAL_I14443P3A_CASCADE_LEVEL_3 0x97
PCD transmits cascade level byte part of anti-collision command to PICC. If value differs
from these three values, command is invalid.
Cards owning 4 byte long UID, run only. After third cascade complete, UID must be
known for any UID length case.
*pUidIn: is pointer to UID of card.
bNvbUidIn: is number of valid bits UID of the card currently processed by Anti-collision
procedure. Actually, this variable carries two information encoded within. MSB four bytes
keeps information about number of valid bytes and lower foursome of bytes represents
number of valid bits for currently processed UID.
*pUidOut: is pointer to array, where updated UID of card will be load after function
finishes successfully. The array is increased in amount of bytes depending on a current
Anticollision phase of the Anti-collision represented by
bCascadeLevel
. During operation of