NXP Reader Library  v17.1.0.2535

SAM commands used for ISO14443 layer 4 communication in X-Mode. More...

Collaboration diagram for ISO14443-4:

Macros

#define PHHAL_HW_SAMAV2_CMD_MAX_UID_LENGTH   0x0A
 Max length of the UID.
 
#define PHHAL_HW_SAMAV2_CMD_INIT_DATA_LENGTH_MAX   0x05
 length of init data; fixed to 05h
 
#define PHHAL_HW_SAMAV2_CMD_AUTO_CID   0xFF
 the SAM-X will automatically assign a CID to the card
 
#define PHHAL_HW_SAMAV2_CMD_CIDS_TO_FREE_MAX   0x0E
 Max Number CID(s) to free.
 
#define PHHAL_HW_SAMAV2_CMD_EMPTY_CID   0x00
 ISO14443-4_ do not FreeCID

 
#define PHHAL_HW_SAMAV2_CMD_RATS_PPS_DATA_LENGTH   0x03
 RATS_PPS command data CID, DRI, DSI.
 
#define PHHAL_HW_SAMAV2_CMD_RATS_PPS_RESPONSE_DATA   0x04
 RATS_PPS response data CID, DRI, DSI, ATS.
 
#define PHHAL_HW_SAMAV2_CMD_RATS_PPS_INS   0xE0
 ISO14443-4_RATS_PPS command.
 
#define PHHAL_HW_SAMAV2_CMD_DRI_DSI_SPEED_106   0x00
 DRI, DSI coding and resulting bit rate 106kbit/s.
 
#define PHHAL_HW_SAMAV2_CMD_DRI_DSI_SPEED_212   0x01
 DRI, DSI coding and resulting bit rate 212kbit/s.
 
#define PHHAL_HW_SAMAV2_CMD_DRI_DSI_SPEED_424   0x02
 DRI, DSI coding and resulting bit rate 424kbit/s.
 
#define PHHAL_HW_SAMAV2_CMD_DRI_DSI_SPEED_848   0x03
 DRI, DSI coding and resulting bit rate 848kbit/s.
 
#define PHHAL_HW_SAMAV2_CMD_ATS_MAX_LENGTH   0xFF
 Max length of the ATS array.
 
#define PHHAL_HW_SAMAV2_CMD_FREE_CID   0xFF
 Take next free CID.
 

Functions

phStatus_t phhalHw_SamAV2_Cmd_X_ISO14443_4_RATS_PPS (phhalHw_SamAV2_DataParams_t *pDataParams, uint8_t bCidIn, uint8_t bDsiIn, uint8_t bDriIn, uint8_t *pCidOut, uint8_t *pDsiOut, uint8_t *pDriOut, uint8_t *pAts)
 Perform a combined RATS and PPS to prepare a card for T=CL data exchange. More...
 
phStatus_t phhalHw_SamAV2_Cmd_X_ISO14443_4_Init (phhalHw_SamAV2_DataParams_t *pDataParams, uint8_t bCid, uint8_t bDri, uint8_t bDsi, uint8_t bFwi, uint8_t bFsci)
 Perform a init of ISO-14443-4 layer (init T=CL protocol). More...
 
phStatus_t phhalHw_SamAV2_Cmd_X_ISO14443_4_Exchange (phhalHw_SamAV2_DataParams_t *pDataParams, uint16_t wOption, uint8_t *pAppDataIn, uint8_t bLenAppData, uint8_t **ppAppDataOut, uint16_t *pAppDataOutLength)
 Perform an exchange bytes according ISO14443-4 T=CL protocol. More...
 
phStatus_t phhalHw_SamAV2_Cmd_X_ISO14443_4_PresenceCheck (phhalHw_SamAV2_DataParams_t *pDataParams)
 Check if an activated card is still in the field. More...
 
phStatus_t phhalHw_SamAV2_Cmd_X_ISO14443_4_Deselect (phhalHw_SamAV2_DataParams_t *pDataParams, uint8_t bFreeCid)
 Perform a Deselect command. More...
 
phStatus_t phhalHw_SamAV2_Cmd_X_ISO14443_4_FreeCid (phhalHw_SamAV2_DataParams_t *pDataParams, uint8_t *pCid, uint8_t bCidLength)
 Free one or more currently assigned CIDs. More...
 

Sam AV2 command code for ISO14443 Layer 4 feature.

#define PHHAL_HW_SAMAV2_RATS_PPS_INS   0xE0
 ISO14443-4_RATS_PPS command.
 
#define PHHAL_HW_SAMAV2_CMD_INIT_INS   0x11
 ISO14443-4_Init command.
 
#define PHHAL_HW_SAMAV2_CMD_EXCHANGE_INS   0xEC
 ISO14443-4_Exchange command.
 
#define PHHAL_HW_SAMAV2_CMD_PRESENCE_CHECK_INS   0x4C
 ISO14443-4_Exchange command.
 
#define PHHAL_HW_SAMAV2_CMD_DESELECT_INS   0xD4
 ISO14443-4_Init command.
 
#define PHHAL_HW_SAMAV2_CMD_FREE_CID_INS   0xFC
 ISO14443-4_FreeCID command.
 

Option macros for Sam AV2 ISO14443 - 4 Deselect command.

#define PHHAL_HW_SAMAV2_CMD_ISO14443_4_DESELECT_FREECID_DEFAULT   0x00
 Default bFreeCid mask for Deselect.
 
#define PHHAL_HW_SAMAV2_CMD_ISO14443_3_DESELECT_FREECID_FORCE_FREEING   0x01
 Option flag for forcing CID to be freed in any case.
 

Detailed Description

SAM commands used for ISO14443 layer 4 communication in X-Mode.

Function Documentation

◆ phhalHw_SamAV2_Cmd_X_ISO14443_4_RATS_PPS()

phStatus_t phhalHw_SamAV2_Cmd_X_ISO14443_4_RATS_PPS ( phhalHw_SamAV2_DataParams_t pDataParams,
uint8_t  bCidIn,
uint8_t  bDsiIn,
uint8_t  bDriIn,
uint8_t pCidOut,
uint8_t pDsiOut,
uint8_t pDriOut,
uint8_t pAts 
)

Perform a combined RATS and PPS to prepare a card for T=CL data exchange.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bCidIn[In] CID to be sent.
[in]bDsiIn[In] DSI to be sent.
[in]bDriIn[In] DRI to be sent.
[out]pCidOut[Out] CID used (1 byte).
[out]pDsiOut[Out] DSI used (1 byte).
[out]pDriOut[Out] DRI used (1 byte).
[out]pAts[Out] Pointer to a buffer containing the received ATS. The length of the ATS can be found on the first position.

◆ phhalHw_SamAV2_Cmd_X_ISO14443_4_Init()

phStatus_t phhalHw_SamAV2_Cmd_X_ISO14443_4_Init ( phhalHw_SamAV2_DataParams_t pDataParams,
uint8_t  bCid,
uint8_t  bDri,
uint8_t  bDsi,
uint8_t  bFwi,
uint8_t  bFsci 
)

Perform a init of ISO-14443-4 layer (init T=CL protocol).

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bCid[In] CID to apply.
[in]bDri[In] Bit rate PCD -> PICC.
[in]bDsi[In] Bit rate PICC -> PCD
[in]bFwi[In] Frame waiting time indicator.
[in]bFsci[In] Frame size card indicator.

◆ phhalHw_SamAV2_Cmd_X_ISO14443_4_Exchange()

phStatus_t phhalHw_SamAV2_Cmd_X_ISO14443_4_Exchange ( phhalHw_SamAV2_DataParams_t pDataParams,
uint16_t  wOption,
uint8_t pAppDataIn,
uint8_t  bLenAppData,
uint8_t **  ppAppDataOut,
uint16_t pAppDataOutLength 
)

Perform an exchange bytes according ISO14443-4 T=CL protocol.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wOption[In] Option parameter:
[in]pAppDataIn[In] Buffer containing application data to sent.
[in]bLenAppData[In] Length of application data to sent.
[out]ppAppDataOut[Out] Pointer to buffer containing the data returned by the PICC.
[out]pAppDataOutLength[Out] Amount of valid bytes in ppAppDataOut.

◆ phhalHw_SamAV2_Cmd_X_ISO14443_4_PresenceCheck()

phStatus_t phhalHw_SamAV2_Cmd_X_ISO14443_4_PresenceCheck ( phhalHw_SamAV2_DataParams_t pDataParams)

Check if an activated card is still in the field.

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

◆ phhalHw_SamAV2_Cmd_X_ISO14443_4_Deselect()

phStatus_t phhalHw_SamAV2_Cmd_X_ISO14443_4_Deselect ( phhalHw_SamAV2_DataParams_t pDataParams,
uint8_t  bFreeCid 
)

Perform a Deselect command.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bFreeCid[In] Bitmask for deselect option.

◆ phhalHw_SamAV2_Cmd_X_ISO14443_4_FreeCid()

phStatus_t phhalHw_SamAV2_Cmd_X_ISO14443_4_FreeCid ( phhalHw_SamAV2_DataParams_t pDataParams,
uint8_t pCid,
uint8_t  bCidLength 
)

Free one or more currently assigned CIDs.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]pCid[In] Buffer containing all CIDs to be freed.
[in]bCidLength[In] Length of the CID buffer (01h to 0Eh).