NXP Reader Library  v17.1.0.2535

Specific SAM HAL component for SAM (AV4 and future SAM's) More...

Collaboration diagram for Component : SAM:

Modules

 Error Codes
 Error Codes received from SAM and the equivalent Reader Library mapped error codes returned to user.
 
 Host Communication
 Implementation of Host Communication interfaces.
 
 Utility
 Implementation of Utility interfaces.
 
 Command Interface
 Implementation of all SAM commands.
 
 Global Defines
 Macro Definitions used across the whole SAM implementation.
 

Data Structures

struct  phhalHw_Sam_DataParams_t
 Data structure for HAL SAM (AV4 and future SAM's) layer implementation
More...
 

Macros

#define PHHAL_HW_SAM_ID   0x13U
 ID for SAM (AV4 and future SAM's) HAL component.
 

Functions

phStatus_t phhalHw_Sam_Init (phhalHw_Sam_DataParams_t *pDataParams, uint16_t wSizeOfDataParams, void *pBalDataParams, void *pReaderHalDataParams, void *pKeyStoreDataParams, void *pCryptoENCDataParams, void *pCryptoMACDataParams, void *pCryptoRngDataParams, void *pPLUpload_CryptoENCDataParams, void *pPLUpload_CryptoMACDataParams, uint8_t bOpMode, uint8_t bLogicalChannel, uint8_t *pTxBuffer, uint16_t wTxBufSize, uint8_t *pRxBuffer, uint16_t wRxBufSize, uint8_t *pPLUploadBuf, uint8_t *pCmdBuff, uint16_t wCmdBuffSize)
 Interface to initialize the SAM (AV4 and future SAM's) component. More...
 
phStatus_t phhalHw_Sam_DetectMode (phhalHw_Sam_DataParams_t *pDataParams)
 Saves UID and mode of SAM (AV3, AV4, future SAM's). More...
 

Detailed Description

Specific SAM HAL component for SAM (AV4 and future SAM's)

Function Documentation

◆ phhalHw_Sam_Init()

phStatus_t phhalHw_Sam_Init ( phhalHw_Sam_DataParams_t pDataParams,
uint16_t  wSizeOfDataParams,
void *  pBalDataParams,
void *  pReaderHalDataParams,
void *  pKeyStoreDataParams,
void *  pCryptoENCDataParams,
void *  pCryptoMACDataParams,
void *  pCryptoRngDataParams,
void *  pPLUpload_CryptoENCDataParams,
void *  pPLUpload_CryptoMACDataParams,
uint8_t  bOpMode,
uint8_t  bLogicalChannel,
uint8_t pTxBuffer,
uint16_t  wTxBufSize,
uint8_t pRxBuffer,
uint16_t  wRxBufSize,
uint8_t pPLUploadBuf,
uint8_t pCmdBuff,
uint16_t  wCmdBuffSize 
)

Interface to initialize the SAM (AV4 and future SAM's) component.

  • pTxBuffer should be Size + Reserved Tx Buffer Len. If pTxBuffer is 256, then it should be 256 + Reserved Tx Buffer Len.
  • pRxBuffer should be Size + Reserved Rx Buffer Len. If pRxBuffer is 256, then it should be 256 + Reserved Rx Buffer Len.
  • The operation mode used is only depended on the pReaderHalDataParams parameter.
    • If pReaderHalDataParams parameter value is NULL X-Mode operation is performed, otherwise the HAL operates in S-Mode (Non-X) Mode.
    • Non-X Mode Specific: It is not necessary to do any (non-specific) calls to the linked Reader-HAL except an Init(), the Sam HAL will take over complete control of the linked Reader.
  • In case of S-Mode communication,
    • Pegoda - 3 reader (CLRD730): pBalDataParams parameter should be initialized with BAL SAM component, BAL SAM's pLowerBalDataParams parameter should be linked to one of the following,
    • Pegoda - 2 reader (MFEV710)
      • SAM inserted in Reader slot: pBalDataParams parameter should be initialized with BAL SAM component and BAL SAM's pLowerBalDataParams parameter should be linked to BAL PCSCWin.
      • SAM inserted in other contact based readers: pBalDataParams parameter should be initialized with BAL PCSCWin component.
  • In case of X-Mode communication for Pegoda - 2 reader (MFEV710, SAM inserted in Reader slot), pBalDataParams parameter should be initialized with BAL PCSCWin component.
  • SAM Supports communication command exchange via ISO7816 T = 1 and I2C communication. To configure the communication type call Set Config with configuration identifier as Communication Type
  • To configure I2C Timeout, I2C BitRate and I2C Slave Address, call the below identifiers using Set Config interface
  • Default 0x2B will be used as Slave Address and 200ms timeout for I2C Communication.
Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_DATA_PARAMS
  • If the size of Sam context not matching with wSizeOfDataParams.
  • pDataParams is NULL.
PH_ERR_INVALID_PARAMETER
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wSizeOfDataParams[In] Specifies the size of the data parameter structure.
[in]pBalDataParams[In] Pointer to the lower layers parameter structure.
[in]pReaderHalDataParams[In] Pointer to a Reader-HAL in Non-X Mode. Can be NULL if X-Mode is intended.
[in]pKeyStoreDataParams[In] Pointer to the KeyStore used for Host Authentication interfaces.
[in]pCryptoENCDataParams[In] Pointer to the ENC crypto layers parameter structure.
[in]pCryptoMACDataParams[In] Pointer to the MAC crypto layers parameter structure.
[in]pCryptoRngDataParams[In] Pointer to the parameter structure of the CryptoRng layer.
pPLUpload_CryptoENCDataParamsPointer to the ENC crypto layers parameter structure. This will be used for ProgrammableLogic feature only.
pPLUpload_CryptoMACDataParamsPointer to the MAC crypto layers parameter structure. This will be used for ProgrammableLogic feature only.
[in]bOpMode[In] The desired operation mode. One of the below values
[in]bLogicalChannel[In] The desired logical channel for this HAL.
[in]pTxBuffer[In] Buffer for SAM command transmission.
[in]wTxBufSize[In] Size of the global transmit buffer.
[in]pRxBuffer[In] Buffer for SAM command Reception.
[in]wRxBufSize[In] Size of the global receive buffer.
[in]pPLUploadBuf[In] Buffer for Programmable Logic operations.
[in]pCmdBuff[In] Pointer to global command buffer. This will be used to frame SAM Command internally by the library.
[in]wCmdBuffSize[In] Size of the global transmit buffer.

◆ phhalHw_Sam_DetectMode()

phStatus_t phhalHw_Sam_DetectMode ( phhalHw_Sam_DataParams_t pDataParams)

Saves UID and mode of SAM (AV3, AV4, future SAM's).

This function should be called prior to all other functions even before Host Authentication.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.