NXP Reader Library  v17.1.0.2535

Supported ReaderIC commands. More...

Collaboration diagram for Commands:

Functions

phStatus_t phhalHw_Rc663_Cmd_Lpcd (phhalHw_Rc663_DataParams_t *pDataParams, uint8_t bMode, uint8_t bI, uint8_t bQ, uint16_t wPowerDownTimeMs, uint16_t wDetectionTimeUs)
 Perform Low-Power-Card-Detection. More...
 
phStatus_t phhalHw_Rc663_Cmd_LpcdConfig (phhalHw_Rc663_DataParams_t *pDataParams, uint8_t *pI, uint8_t *pQ)
 Perform Low-Power-Card-Detection Configuration Procedure. More...
 
phStatus_t phhalHw_Rc663_Cmd_LoadKey (phhalHw_Rc663_DataParams_t *pDataParams, uint8_t *pKey)
 Load a MIFARE key into the key-buffer. More...
 
phStatus_t phhalHw_Rc663_Cmd_AckReq (phhalHw_Rc663_DataParams_t *pDataParams, uint8_t *pRxBuffer, uint16_t *wRxBufferLen)
 Performs a query, an Ack and a Req-Rn. More...
 
phStatus_t phhalHw_Rc663_Cmd_Receive (phhalHw_Rc663_DataParams_t *pDataParams, uint16_t wOption, uint8_t **ppRxBuffer, uint16_t *pRxLength)
 Start receiver and wait until reception or timeout. More...
 
phStatus_t phhalHw_Rc663_Cmd_Transmit (phhalHw_Rc663_DataParams_t *pDataParams, uint16_t wOption, uint8_t *pTxBuffer, uint16_t wTxLength)
 Transmit bytes to card without starting receiver afterwards. More...
 
phStatus_t phhalHw_Rc663_Cmd_WriteE2 (phhalHw_Rc663_DataParams_t *pDataParams, uint16_t wAddress, uint8_t bData)
 Write one byte of data to a given EEPROM address. More...
 
phStatus_t phhalHw_Rc663_Cmd_WriteE2Page (phhalHw_Rc663_DataParams_t *pDataParams, uint16_t wAddress, uint8_t *pData, uint8_t bDataLen)
 Write a number of data bytes to a given EEPROM page. More...
 
phStatus_t phhalHw_Rc663_Cmd_ReadE2 (phhalHw_Rc663_DataParams_t *pDataParams, uint16_t wAddress, uint16_t wNumBytes, uint8_t *pData)
 Read one byte from a given EEPROM address. More...
 
phStatus_t phhalHw_Rc663_Cmd_LoadReg (phhalHw_Rc663_DataParams_t *pDataParams, uint16_t wEEAddress, uint8_t bRegAddress, uint8_t bNumBytes)
 Copies a defined number of bytes from the EEPROM into the register set, beginning at the given register address RegAdr. More...
 
phStatus_t phhalHw_Rc663_Cmd_LoadProtocol (phhalHw_Rc663_DataParams_t *pDataParams, uint8_t bTxProtocol, uint8_t bRxProtocol)
 Initializes protected registers for a dedicated protocol. More...
 
phStatus_t phhalHw_Rc663_Cmd_LoadKeyE2 (phhalHw_Rc663_DataParams_t *pDataParams, uint8_t bKeyNo)
 Load a MIFARE key from EEPROM into the key-buffer. More...
 
phStatus_t phhalHw_Rc663_Cmd_StoreKeyE2 (phhalHw_Rc663_DataParams_t *pDataParams, uint8_t bKeyNo, uint8_t *pKeys, uint8_t bNumberOfKeys)
 Write one or more MIFARE key(s) into EEPROM. More...
 
phStatus_t phhalHw_Rc663_Cmd_SoftReset (phhalHw_Rc663_DataParams_t *pDataParams)
 Performs a Softreset. More...
 

Low-Power-Card-Detection Modes

#define PHHAL_HW_RC663_CMD_LPCD_MODE_DEFAULT   0x00U
 Default mode. More...
 
#define PHHAL_HW_RC663_CMD_LPCD_MODE_POWERDOWN   0x01U
 Powers down the IC for a certain amount of time and performs LPC after wakeup. More...
 
#define PHHAL_HW_RC663_CMD_LPCD_MODE_POWERDOWN_GUARDED   0x02U
 Same as PHHAL_HW_RC663_CMD_LPCD_MODE_POWERDOWN, but uses the timeout set with either PHHAL_HW_CONFIG_TIMING_US or PHHAL_HW_CONFIG_TIMING_MS as abort criteria. More...
 
#define PHHAL_HW_RC663_CMD_LPCD_MODE_OPTION_TRIMM_LPO   0x80U
 Or this bit to the desired mode to perform LPO trimming together with the command.
 
#define PHHAL_HW_RC663_CMD_LPCD_MODE_OPTION_IGNORE_IQ   0x40U
 Or this bit to the desired mode to prevent the function to set I and Q channel values.
 
#define PHHAL_HW_RC663_CMD_LPCD_MODE_OPTION_MASK   0xF0U
 Mask for option bits within Mode byte.
 

Detailed Description

Supported ReaderIC commands.

Macro Definition Documentation

◆ PHHAL_HW_RC663_CMD_LPCD_MODE_DEFAULT

#define PHHAL_HW_RC663_CMD_LPCD_MODE_DEFAULT   0x00U

Default mode.

Try LPCD until timeout is reached.

◆ PHHAL_HW_RC663_CMD_LPCD_MODE_POWERDOWN

#define PHHAL_HW_RC663_CMD_LPCD_MODE_POWERDOWN   0x01U

Powers down the IC for a certain amount of time and performs LPC after wakeup.

If no card is found the IC is powered down again and the procedure is restarted. If a card is found the function returns and the IC remains powered up.

◆ PHHAL_HW_RC663_CMD_LPCD_MODE_POWERDOWN_GUARDED

#define PHHAL_HW_RC663_CMD_LPCD_MODE_POWERDOWN_GUARDED   0x02U

Same as PHHAL_HW_RC663_CMD_LPCD_MODE_POWERDOWN, but uses the timeout set with either PHHAL_HW_CONFIG_TIMING_US or PHHAL_HW_CONFIG_TIMING_MS as abort criteria.

Be advised that the guard-timer in this case is only running during the power-up phases, so the timeout has to be adjusted properly.

Function Documentation

◆ phhalHw_Rc663_Cmd_Lpcd()

phStatus_t phhalHw_Rc663_Cmd_Lpcd ( phhalHw_Rc663_DataParams_t pDataParams,
uint8_t  bMode,
uint8_t  bI,
uint8_t  bQ,
uint16_t  wPowerDownTimeMs,
uint16_t  wDetectionTimeUs 
)

Perform Low-Power-Card-Detection.

In default-mode the bPowerDownTimeMs and bDetectionTimeUs parameters are not used.
The timeout set with PHHAL_HW_CONFIG_TIMEOUT_VALUE_US or PHHAL_HW_CONFIG_TIMEOUT_VALUE_MS is always used as stop-condition.

Returns
Status code
Return values
PH_ERR_SUCCESSCard present.
PH_ERR_IO_TIMEOUTNo card found.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bMode[In] One of the above LPCD modes.
[in]bI[In] I-Channel value in case of no card on antenna.
[in]bQ[In] Q-Channel value in case of no card on antenna.
[in]wPowerDownTimeMs[In] Power-Down time in milliseconds if power-down mode is used.
[in]wDetectionTimeUs[In] Detection time in microseconds if power-down mode is used.

◆ phhalHw_Rc663_Cmd_LpcdConfig()

phStatus_t phhalHw_Rc663_Cmd_LpcdConfig ( phhalHw_Rc663_DataParams_t pDataParams,
uint8_t pI,
uint8_t pQ 
)

Perform Low-Power-Card-Detection Configuration Procedure.

Returns the I and Q channel values for the current antenna status. This is inteded to be used to retrieve the I and Q channel values in case of no card on antenna. The values can directly be used as parameters for the phhalHw_Rc663_Cmd_Lpcd function.

Returns
Status code
Return values
PH_ERR_SUCCESSTrimming successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[out]pI[Out] I-Channel value in case of no card on antenna.
[out]pQ[Out] Q-Channel value in case of no card on antenna.

◆ phhalHw_Rc663_Cmd_LoadKey()

phStatus_t phhalHw_Rc663_Cmd_LoadKey ( phhalHw_Rc663_DataParams_t pDataParams,
uint8_t pKey 
)

Load a MIFARE key into the key-buffer.

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]pKey[In] 6 byte MIFARE key.

◆ phhalHw_Rc663_Cmd_AckReq()

phStatus_t phhalHw_Rc663_Cmd_AckReq ( phhalHw_Rc663_DataParams_t pDataParams,
uint8_t pRxBuffer,
uint16_t wRxBufferLen 
)

Performs a query, an Ack and a Req-Rn.

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.
[out]pRxBuffer[Out]Pointer to receive output of CmdAckReq.
[out]wRxBufferLen[Out]Length of the Data read.

◆ phhalHw_Rc663_Cmd_Receive()

phStatus_t phhalHw_Rc663_Cmd_Receive ( phhalHw_Rc663_DataParams_t pDataParams,
uint16_t  wOption,
uint8_t **  ppRxBuffer,
uint16_t pRxLength 
)

Start receiver and wait until reception or timeout.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_IO_TIMEOUTNo response received.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wOption[In] Option parameter.
[out]ppRxBuffer[Out] Pointer to received data.
[out]pRxLength[Out] Number of received data bytes.

◆ phhalHw_Rc663_Cmd_Transmit()

phStatus_t phhalHw_Rc663_Cmd_Transmit ( phhalHw_Rc663_DataParams_t pDataParams,
uint16_t  wOption,
uint8_t pTxBuffer,
uint16_t  wTxLength 
)

Transmit bytes to card without starting receiver afterwards.

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]pTxBuffer[In] Data to transmit.
[in]wTxLength[In] Length of data to transmit.

◆ phhalHw_Rc663_Cmd_WriteE2()

phStatus_t phhalHw_Rc663_Cmd_WriteE2 ( phhalHw_Rc663_DataParams_t pDataParams,
uint16_t  wAddress,
uint8_t  bData 
)

Write one byte of data to a given EEPROM address.

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]wAddress[In] 2 byte Address; Range is 0x0000 - 0x1FFF.
[in]bData[In] Data byte to write.

◆ phhalHw_Rc663_Cmd_WriteE2Page()

phStatus_t phhalHw_Rc663_Cmd_WriteE2Page ( phhalHw_Rc663_DataParams_t pDataParams,
uint16_t  wAddress,
uint8_t pData,
uint8_t  bDataLen 
)

Write a number of data bytes to a given EEPROM page.

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]wAddress[In] 2 byte Address; Range is 0x0000 - 0x007F.
[in]pData[In] Pointer to data byte array.
[in]bDataLen[In] Number of data bytes to write; Range is 1 - 64.

◆ phhalHw_Rc663_Cmd_ReadE2()

phStatus_t phhalHw_Rc663_Cmd_ReadE2 ( phhalHw_Rc663_DataParams_t pDataParams,
uint16_t  wAddress,
uint16_t  wNumBytes,
uint8_t pData 
)

Read one byte from a given EEPROM address.

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]wAddress[In] 2 byte Address; Range is 0x0000 - 0x1FFF.
[in]wNumBytes[In] Number of data bytes to read; Range is 0(256) - 256.
[out]pData[Out] Requested data bytes.

◆ phhalHw_Rc663_Cmd_LoadReg()

phStatus_t phhalHw_Rc663_Cmd_LoadReg ( phhalHw_Rc663_DataParams_t pDataParams,
uint16_t  wEEAddress,
uint8_t  bRegAddress,
uint8_t  bNumBytes 
)

Copies a defined number of bytes from the EEPROM into the register set, beginning at the given register address RegAdr.

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]wEEAddress[In] 2 byte EEPROM Address; Range is 0x00C0 - 0x17FF.
[in]bRegAddress[In] Register Address; Range is 0x00 - 0xFF.
[in]bNumBytes[In] Number of bytes to copy; Range is 1 - 255.

◆ phhalHw_Rc663_Cmd_LoadProtocol()

phStatus_t phhalHw_Rc663_Cmd_LoadProtocol ( phhalHw_Rc663_DataParams_t pDataParams,
uint8_t  bTxProtocol,
uint8_t  bRxProtocol 
)

Initializes protected registers for a dedicated 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]bTxProtocol[In] Tx-Protocol (see PHHAL_HW_RC663_RXTX_* defines).
[in]bRxProtocol[In] Rx-Protocol (see PHHAL_HW_RC663_RXTX_* defines).

◆ phhalHw_Rc663_Cmd_LoadKeyE2()

phStatus_t phhalHw_Rc663_Cmd_LoadKeyE2 ( phhalHw_Rc663_DataParams_t pDataParams,
uint8_t  bKeyNo 
)

Load a MIFARE key from EEPROM into the key-buffer.

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]bKeyNo[In] Key number in EEPROM; Range is 0x00 - 0xFF.

◆ phhalHw_Rc663_Cmd_StoreKeyE2()

phStatus_t phhalHw_Rc663_Cmd_StoreKeyE2 ( phhalHw_Rc663_DataParams_t pDataParams,
uint8_t  bKeyNo,
uint8_t pKeys,
uint8_t  bNumberOfKeys 
)

Write one or more MIFARE key(s) into EEPROM.

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]bKeyNo[In] Key number in EEPROM; Range is 0x00 - 0xFF.
[in]pKeys[In] Pointer to MIFARE key array.
[in]bNumberOfKeys[In] Number of keys to write.

◆ phhalHw_Rc663_Cmd_SoftReset()

phStatus_t phhalHw_Rc663_Cmd_SoftReset ( phhalHw_Rc663_DataParams_t pDataParams)

Performs a Softreset.

Note: It is up to the caller to wait until the IC is powered-up and ready again.
In addition to that, the caller should call phhalHw_ApplyProtocolSettings again to re-configure the IC.

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.