NXP NFC Reader Library  v4.040.05.011646
ISO/IEC 18000-3 Mode3

These Components implement the ISO/IEC 18000-3 Mode3 support. More...

Collaboration diagram for ISO/IEC 18000-3 Mode3:

Modules

 Component : Software
 

Functions

phStatus_t phpalI18000p3m3_Exchange (void *pDataParams, uint16_t wOption, uint8_t *pTxBuffer, uint16_t wTxLength, uint8_t bTxLastBits, uint8_t **ppRxBuffer, uint16_t *pRxLength, uint8_t *pRxLastBits)
 Perform Data Exchange with Tag. More...
 
phStatus_t phpalI18000p3m3_CreateSelectCmd (void *pDataParams, uint8_t bTarget, uint8_t bAction, uint8_t bMemBank, uint8_t *pPointer, uint8_t bPointerLength, uint8_t *pMask, uint8_t bMaskBitLength, uint8_t bTruncate, uint8_t *pSelectCmd, uint8_t *bLen, uint8_t *bValidBits)
 Create the Select command frame. More...
 
phStatus_t phpalI18000p3m3_CreateBeginRoundCmd (void *pDataParams, uint8_t bDr, uint8_t bM, uint8_t bTRext, uint8_t bSel, uint8_t bSession, uint8_t bRfu, uint8_t bQ, uint8_t *pBeginRnd)
 Create the BeginRound command frame. More...
 
phStatus_t phpalI18000p3m3_Ack (void *pDataParams, uint8_t bOption, uint8_t *pHandle, uint8_t **ppRxBuffer, uint16_t *pRxBitLength)
 Perform a Ack for ISO18000-3 Mode3 tags. More...
 
phStatus_t phpalI18000p3m3_Nak (void *pDataParams)
 Perform a Nak for ISO18000-3 Mode3 tags. More...
 
phStatus_t phpalI18000p3m3_ActivateCard (void *pDataParams, uint8_t *pSelCmd, uint8_t bSelCmdLen, uint8_t bNumValidBitsinLastByte, uint8_t *pBeginRndCmd, uint8_t bTSprocessing, uint8_t **ppRxBuffer, uint16_t *pRxBufferLen, uint8_t *pMoreCardsAvailable)
 Bring the first matching tag to OPEN or SECURED state. More...
 
phStatus_t phpalI18000p3m3_SetConfig (void *pDataParams, uint16_t wConfig, uint16_t wValue)
 Sets the configuration parameter. More...
 

Targets

#define PHPAL_I18000P3M3_TARGET_INVENTORIED_S0   0x00U
 INVENTORIED_S0 Target. More...
 
#define PHPAL_I18000P3M3_TARGET_INVENTORIED_S2   0x02U
 INVENTORIED_S2 Target. More...
 
#define PHPAL_I18000P3M3_TARGET_SL   0x04U
 SL Target. More...
 

Memory Banks

#define PHPAL_I18000P3M3_MEMBANK_RESERVED   0x00U /** < Reserved Memory Bank. */
 
#define PHPAL_I18000P3M3_MEMBANK_UII   0x01U /** < UII Memory Bank. */
 
#define PHPAL_I18000P3M3_MEMBANK_TID   0x02U /** < TID Memory Bank. */
 
#define PHPAL_I18000P3M3_MEMBANK_USER   0x03U /** < User Memory Bank. */
 

Link Frequencies (DR)

#define PHPAL_I18000P3M3_LF_423KHZ   0x00U
 423kHz (fc/32). More...
 
#define PHPAL_I18000P3M3_LF_847KHZ   0x01U
 847kHz (fc/16). More...
 

'M' Values

#define PHPAL_I18000P3M3_M_MANCHESTER_2   0x02U
 2 sub-carrier pulse Manchester. More...
 
#define PHPAL_I18000P3M3_M_MANCHESTER_4   0x03U
 4 sub-carrier pulse Manchester. More...
 

'Sel' Values

#define PHPAL_I18000P3M3_SEL_ALL_00   0x00U
 All. More...
 
#define PHPAL_I18000P3M3_SEL_ALL_01   0x01U
 All. More...
 
#define PHPAL_I18000P3M3_SEL_NOT_SL   0x02U
 Select only tags not matching SL. More...
 
#define PHPAL_I18000P3M3_SEL_SL   0x03U
 Select only tags matching SL. More...
 

'Session' Values

#define PHPAL_I18000P3M3_SESSION_S0   0x00U
 Session S0. More...
 
#define PHPAL_I18000P3M3_SESSION_S1   0x01U
 Session S1 (Optional). More...
 
#define PHPAL_I18000P3M3_SESSION_S2   0x02U
 Session S2. More...
 
#define PHPAL_I18000P3M3_SESSION_S3   0x03U
 Session S3 (Optional). More...
 

'UpDn' Values

#define PHPAL_I18000P3M3_UPDN_INCREMENT   0x06U
 Increment Q. More...
 
#define PHPAL_I18000P3M3_UPDN_NOCHANGE   0x00U
 Do not change Q. More...
 
#define PHPAL_I18000P3M3_UPDN_DECREMENT   0x03U
 Decrement Q. More...
 

ACK Options

#define PHPAL_I18000P3M3_ACK_USE_CRC   0x00U
 Use StoredCrc for ACK command. More...
 
#define PHPAL_I18000P3M3_ACK_USE_HANDLE   0x01U
 Use given Handle for ACK command. More...
 

Communication Configs

#define PHPAL_I18000P3M3_CONFIG_TXLASTBITS   0x0003U
 Set number of valid bits of last Tx-Byte. More...
 
#define PHPAL_I18000P3M3_CONFIG_TIMEOUT_VALUE_MS   0x000EU
 Set RC Timeout (in [ms]). More...
 

Values used for Communication Configs

#define PHPAL_I18000P3M3_TXLASTBITS_MAX   0x000FU
 Maximum value used for configuring TXLASTBITS. More...
 
#define PHPAL_I18000P3M3_VALID_TXLASTBITS   0x0007U
 Valid value of TXLASTBITS. More...
 

Detailed Description

These Components implement the ISO/IEC 18000-3 Mode3 support.

Macro Definition Documentation

§ PHPAL_I18000P3M3_TARGET_INVENTORIED_S0

#define PHPAL_I18000P3M3_TARGET_INVENTORIED_S0   0x00U

INVENTORIED_S0 Target.

§ PHPAL_I18000P3M3_TARGET_INVENTORIED_S2

#define PHPAL_I18000P3M3_TARGET_INVENTORIED_S2   0x02U

INVENTORIED_S2 Target.

§ PHPAL_I18000P3M3_TARGET_SL

#define PHPAL_I18000P3M3_TARGET_SL   0x04U

SL Target.

§ PHPAL_I18000P3M3_LF_423KHZ

#define PHPAL_I18000P3M3_LF_423KHZ   0x00U

423kHz (fc/32).

Equivalent to PHHAL_HW_SUBCARRIER_DUAL DR = 0

§ PHPAL_I18000P3M3_LF_847KHZ

#define PHPAL_I18000P3M3_LF_847KHZ   0x01U

847kHz (fc/16).

Equivalent to PHHAL_HW_SUBCARRIER_QUAD DR = 1

§ PHPAL_I18000P3M3_M_MANCHESTER_2

#define PHPAL_I18000P3M3_M_MANCHESTER_2   0x02U

2 sub-carrier pulse Manchester.

Equivalent to #PHHAL_HW_RF_RX_DATARATE_I18000P3M3_MAN2.

§ PHPAL_I18000P3M3_M_MANCHESTER_4

#define PHPAL_I18000P3M3_M_MANCHESTER_4   0x03U

4 sub-carrier pulse Manchester.

Equivalent to #PHHAL_HW_RF_RX_DATARATE_I18000P3M3_MAN4.

§ PHPAL_I18000P3M3_SEL_ALL_00

#define PHPAL_I18000P3M3_SEL_ALL_00   0x00U

All.

§ PHPAL_I18000P3M3_SEL_ALL_01

#define PHPAL_I18000P3M3_SEL_ALL_01   0x01U

All.

§ PHPAL_I18000P3M3_SEL_NOT_SL

#define PHPAL_I18000P3M3_SEL_NOT_SL   0x02U

Select only tags not matching SL.

§ PHPAL_I18000P3M3_SEL_SL

#define PHPAL_I18000P3M3_SEL_SL   0x03U

Select only tags matching SL.

§ PHPAL_I18000P3M3_SESSION_S0

#define PHPAL_I18000P3M3_SESSION_S0   0x00U

Session S0.

§ PHPAL_I18000P3M3_SESSION_S1

#define PHPAL_I18000P3M3_SESSION_S1   0x01U

Session S1 (Optional).

§ PHPAL_I18000P3M3_SESSION_S2

#define PHPAL_I18000P3M3_SESSION_S2   0x02U

Session S2.

§ PHPAL_I18000P3M3_SESSION_S3

#define PHPAL_I18000P3M3_SESSION_S3   0x03U

Session S3 (Optional).

§ PHPAL_I18000P3M3_UPDN_INCREMENT

#define PHPAL_I18000P3M3_UPDN_INCREMENT   0x06U

Increment Q.

§ PHPAL_I18000P3M3_UPDN_NOCHANGE

#define PHPAL_I18000P3M3_UPDN_NOCHANGE   0x00U

Do not change Q.

§ PHPAL_I18000P3M3_UPDN_DECREMENT

#define PHPAL_I18000P3M3_UPDN_DECREMENT   0x03U

Decrement Q.

§ PHPAL_I18000P3M3_ACK_USE_CRC

#define PHPAL_I18000P3M3_ACK_USE_CRC   0x00U

Use StoredCrc for ACK command.

§ PHPAL_I18000P3M3_ACK_USE_HANDLE

#define PHPAL_I18000P3M3_ACK_USE_HANDLE   0x01U

Use given Handle for ACK command.

§ PHPAL_I18000P3M3_CONFIG_TXLASTBITS

#define PHPAL_I18000P3M3_CONFIG_TXLASTBITS   0x0003U

Set number of valid bits of last Tx-Byte.

§ PHPAL_I18000P3M3_CONFIG_TIMEOUT_VALUE_MS

#define PHPAL_I18000P3M3_CONFIG_TIMEOUT_VALUE_MS   0x000EU

Set RC Timeout (in [ms]).

§ PHPAL_I18000P3M3_TXLASTBITS_MAX

#define PHPAL_I18000P3M3_TXLASTBITS_MAX   0x000FU

Maximum value used for configuring TXLASTBITS.

§ PHPAL_I18000P3M3_VALID_TXLASTBITS

#define PHPAL_I18000P3M3_VALID_TXLASTBITS   0x0007U

Valid value of TXLASTBITS.

Function Documentation

§ phpalI18000p3m3_Exchange()

phStatus_t phpalI18000p3m3_Exchange ( void *  pDataParams,
uint16_t  wOption,
uint8_t pTxBuffer,
uint16_t  wTxLength,
uint8_t  bTxLastBits,
uint8_t **  ppRxBuffer,
uint16_t pRxLength,
uint8_t pRxLastBits 
)

Perform Data Exchange with Tag.

wOption can be one of:

Alternatively, the following bits can be combined:

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[in]wOptionOption parameter.
[in]pTxBufferData to transmit.
[in]wTxLengthLength of input data.
[in]bTxLastBitsNumber of valid bits of last byte (Tx).
[out]ppRxBufferPointer to received data.
[out]pRxLengthNumber of received data bytes including incomplete byte.
[out]pRxLastBitsNumber of valid bits of last byte (Rx).

§ phpalI18000p3m3_CreateSelectCmd()

phStatus_t phpalI18000p3m3_CreateSelectCmd ( void *  pDataParams,
uint8_t  bTarget,
uint8_t  bAction,
uint8_t  bMemBank,
uint8_t pPointer,
uint8_t  bPointerLength,
uint8_t pMask,
uint8_t  bMaskBitLength,
uint8_t  bTruncate,
uint8_t pSelectCmd,
uint8_t bLen,
uint8_t bValidBits 
)

Create the Select command frame.

This is a utility function to create the Select frame in the required format of ISO 18000p3m3. Parameters are validated to ensure that wrong values or wrong combinations are checked.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_PARAMETERif wrong options are provided.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[in]bTargetIndicates whether the SL flag or the inventoried flags shall be modified.
[in]bActionIndicates the way of changing the SL flag and the inventoried flags.
[in]bMemBankMemory bank where the mask shall be applied.
[in]pPointerMemory address where the mask shall be applied.
[in]bPointerLengthLength of the pointer, 0->8bits,1->16bits,2->24bits or 3->32bits.
[in]pMaskContains a bit string that a tag compares against the memory location that begins at pPointer.
[in]bMaskBitLengthLength of the mask in bits.
[in]bTruncateSpecifies whether a tag load modulates its entire UII (PH_OFF), or only that portion of the UII immediately following Mask (PH_ON).
[out]pSelectCmdSelect Command frame. (Max 39 bytes)
[out]bLenLength of Select cmd bytes
[out]bValidBitsNumber of valid bits in the last byte of pSelectCmd.

§ phpalI18000p3m3_CreateBeginRoundCmd()

phStatus_t phpalI18000p3m3_CreateBeginRoundCmd ( void *  pDataParams,
uint8_t  bDr,
uint8_t  bM,
uint8_t  bTRext,
uint8_t  bSel,
uint8_t  bSession,
uint8_t  bRfu,
uint8_t  bQ,
uint8_t pBeginRnd 
)

Create the BeginRound command frame.

This is a utility function to create the BeginRound frame in the required format of ISO 18000p3m3. Parameters are validated to ensure that wrong values or wrong combinations are checked.

bDr can be one of

(Number of subcarrier cycles per symbol) cane be one of

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_PARAMETERif wrong options are provided.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[in]bDrDivide ratio.
[in]bMCycles per symbol.
[in]bTRextIndicates whether a pilot tone shall be used in the T=>R pre-amble (PH_ON) or not (PH_OFF).
[in]bSelIndicates which tags shall take part of the inventory round.
[in]bSessionIndicates the session of the inventory round.
[in]bRfuRFU (1 bit).
[in]bQIndicates the number of slots in a round (2^Q slots).
[out]pBeginRndBegin round command frame (3 bytes)

§ phpalI18000p3m3_Ack()

phStatus_t phpalI18000p3m3_Ack ( void *  pDataParams,
uint8_t  bOption,
uint8_t pHandle,
uint8_t **  ppRxBuffer,
uint16_t pRxBitLength 
)

Perform a Ack for ISO18000-3 Mode3 tags.

bOption can be one of:

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[in]bOptionOption parameter.
[in]pHandleHandle value, mandatory if bOption is PHPAL_I18000P3M3_ACK_USE_HANDLE; uint8_t[2].
[out]ppRxBufferPointer to Tag data and, if required, PacketCRC.
[out]pRxBitLengthTag response length in bits.

§ phpalI18000p3m3_Nak()

phStatus_t phpalI18000p3m3_Nak ( void *  pDataParams)

Perform a Nak for ISO18000-3 Mode3 tags.

All tags will move to arbitrate state after receive this command.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.

§ phpalI18000p3m3_ActivateCard()

phStatus_t phpalI18000p3m3_ActivateCard ( void *  pDataParams,
uint8_t pSelCmd,
uint8_t  bSelCmdLen,
uint8_t  bNumValidBitsinLastByte,
uint8_t pBeginRndCmd,
uint8_t  bTSprocessing,
uint8_t **  ppRxBuffer,
uint16_t pRxBufferLen,
uint8_t pMoreCardsAvailable 
)

Bring the first matching tag to OPEN or SECURED state.

The command performs a selection followed by an inventory round. The first responding tag is set to the OPEN or SECURED state and the tag handle is returned. If more tags are in the field, it shall resolve collision and activate one tag. The pMoreCardsAvailable value will be set to 1 if more cards are available in the field.

Issuing the Select command is optional based on the value of bSelCmdLen parameter. If bSelCmdLen parameter is zero, then ISO 18000p3m3 Select command is not issued. Only the BeginRound command is issued.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[in]pSelCmdISO 18000p3m3 Select command frame.
[in]bSelCmdLenSelect command length in bytes- 1 to 39 bytes. If set to zero, Select command is not sent.
[in]bNumValidBitsinLastByteNumber of valid bits in last byte of pSelCmd.
[in]pBeginRndCmdISO 18000p3m3 BeginRound command frame. This is 17bits i.e., 3 bytes are expected. CRC5 should not be provided.
[in]bTSprocessingTimeSlot processing behavior.
[out]ppRxBufferPointer to HAL Rx Buffer containing handle of the activated tag.
[out]pRxBufferLenLength of response in hal Rx Buffer.
[out]pMoreCardsAvailableIndicates if more tags are present in the field.

§ phpalI18000p3m3_SetConfig()

phStatus_t phpalI18000p3m3_SetConfig ( void *  pDataParams,
uint16_t  wConfig,
uint16_t  wValue 
)

Sets the configuration parameter.

This function sets the values for the provided configuration parameter

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[in]wConfigConfiguration Identifier.
[in]wValueConfiguration Value.