NXP Reader Library  v17.1.0.2535

SAM commands used for Programmable Logic feature. More...

Collaboration diagram for Programmable Logic:

Modules

 Reader Chips
 SAM commands used for reader IC communication.
 
 ISO14443-3
 SAM commands used for ISO14443 layer 3 communication in X-Mode.
 
 ISO14443-4
 SAM commands used for ISO14443 layer 4 communication in X-Mode.
 

Functions

phStatus_t phhalHw_SamAV3_Cmd_SAM_PLExec (phhalHw_SamAV3_DataParams_t *pDataParams, uint8_t bLFI, uint8_t *pPLData, uint8_t bPLDataLen, uint8_t **ppPLResp, uint16_t *pPLRespLen)
 Performs Programmable Logic execution. More...
 
phStatus_t phhalHw_SamAV3_Cmd_SAM_PLUpload (phhalHw_SamAV3_DataParams_t *pDataParams, uint8_t bIsFirstFrame, uint8_t bIsFinalFrame, uint16_t wUploadCtr, uint8_t bKeyNo, uint8_t bKeyVer, uint8_t *pPLCode, uint16_t wPLCodeLen, uint8_t *pPLReKey, uint8_t bPLReKeyLen)
 Performs Programmable Logic code upload. More...
 

Sam AV3 INS command code for Programmable Logic feature.

#define PHHAL_HW_CMD_SAMAV3_PL_EXEC_INS   0xBE
 Sam Programmable Logic Instruction code for PL Execute command.
 
#define PHHAL_HW_CMD_SAMAV3_PL_UPLOAD_INS   0xBF
 Sam Programmable Logic Instruction code for PL Upload command.
 

Option macros for PLExec and PLUpload command's P1 inforamtion byte.

#define PHHAL_HW_CMD_SAMAV3_PROG_LOGIC_LFI_LAST   0x00
 Sam Programmable logic P1 information byte as not the last frame.
 
#define PHHAL_HW_CMD_SAMAV3_PROG_LOGIC_LFI_NON_LAST   0xAF
 Sam Programmable logic P1 information byte as the last frame.
 

Detailed Description

SAM commands used for Programmable Logic feature.

Function Documentation

◆ phhalHw_SamAV3_Cmd_SAM_PLExec()

phStatus_t phhalHw_SamAV3_Cmd_SAM_PLExec ( phhalHw_SamAV3_DataParams_t pDataParams,
uint8_t  bLFI,
uint8_t pPLData,
uint8_t  bPLDataLen,
uint8_t **  ppPLResp,
uint16_t pPLRespLen 
)

Performs Programmable Logic execution.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_SUCCESS_CHAININGfor chaining response.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bLFI[In] Option for updating the P1 information of Sam frame.
[in]pPLData[In] Programmable Logic command data.
[in]bPLDataLen[In] Length of Programmable Logic command data.
[out]ppPLResp[Out] Buffer holding the Programmable Logic response data.
Actual data received from SAM.
Actual error data received from SAM. The response will be of 2 bytes.
[out]pPLRespLen[Out] Length of Programmable Logic response data.

◆ phhalHw_SamAV3_Cmd_SAM_PLUpload()

phStatus_t phhalHw_SamAV3_Cmd_SAM_PLUpload ( phhalHw_SamAV3_DataParams_t pDataParams,
uint8_t  bIsFirstFrame,
uint8_t  bIsFinalFrame,
uint16_t  wUploadCtr,
uint8_t  bKeyNo,
uint8_t  bKeyVer,
uint8_t pPLCode,
uint16_t  wPLCodeLen,
uint8_t pPLReKey,
uint8_t  bPLReKeyLen 
)

Performs Programmable Logic code upload.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_SUCCESS_CHAININGfor chaining response.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bIsFirstFrame[In] Option to represent the first frame where the UploadCtr will be exchanged.
[in]bIsFinalFrame[In] Option to represent the last frame. If set, the LE byte will be exchanged and PLUploadACK will be received from SAM and will be validated internally.
[in]wUploadCtr[In] The upload counter value. This should be greater than the one availabe in SAM.
[in]bKeyNo[In] Key number of Upload key (Ku) in software keystore.
[in]bKeyVer[In] Key version of Upload key (Ku) in software keystore.
[in]pPLCode[In] Plain Programmable Logic code.
[in]wPLCodeLen[In] Plain Programmable Logic code length.
[in]pPLReKey[In] The Rekey to be used for next crypto segment. This should have the next SessionENC key followed by the SessionMAC key.
[in]bPLReKeyLen[In] Length of bytes available in PLReKey buffer. The length should be equal to double AES key size.