NXP NFC Reader Library v4.040.05.011646

Modules | Functions
ISO/IEC 14443-4A
Protocol Abstraction Layer

These Components configure PHPAL_I14443P4A. More...

Collaboration diagram for ISO/IEC 14443-4A:

## Modules
| Component : Software

## Functions
phStatus_t | phpalI14443p4a_Rats (void *pDataParams, uint8_t bFsdi, uint8_t bCid, uint8_t *pAts)
| Perform a ISO14443-4A "Request Answer to Select" command. More...
phStatus_t | phpalI14443p4a_Pps (void *pDataParams, uint8_t bDri, uint8_t bDsi)
| Perform a ISO14443-4A "Protocol and Parameter Selection" command. More...
phStatus_t | phpalI14443p4a_ActivateCard (void *pDataParams, uint8_t bFsdi, uint8_t bCid, uint8_t bDri, uint8_t bDsi, uint8_t *pAts)
| Perform ISO14443-4A Rats and Pps commands. More...
phStatus_t | phpalI14443p4a_GetProtocolParams (void *pDataParams, uint8_t *pCidEnabled, uint8_t *pCid, uint8_t *pNadSupported, uint8_t *pFwi, uint8_t *pFsdi, uint8_t *pFsci)
| Retrieve the ISO14443-4A protocol parameters. More...
phStatus_t | phpalI14443p4a_SetConfig (void *pDataParams, uint16_t wConfig, uint16_t wValue)
| Set configuration parameter. More...

## Configuration
#define | PHPAL_I14443P4A_CONFIG_OPE_MODE 0x01
| Configure Operation Mode for this Layer. More...
#define | PHPAL_I14443P4A_CONFIG_RATS_RETRY_COUNT 0x02
| Configure retry count for RATS command. More...

## DRI/DSI Values
#define | PHPAL_I14443P4A_DATARATE_106 0x00U
| DRI/DSI value for 106 kBit/s. More...
#define | PHPAL_I14443P4A_DATARATE_212 0x01U
| DRI/DSI value for 212 kBit/s. More...
#define | PHPAL_I14443P4A_DATARATE_424 0x02U
| DRI/DSI value for 424 kBit/s. More...
#define | PHPAL_I14443P4A_DATARATE_848 0x03U
| DRI/DSI value for 848 kBit/s. More...

## RATS Command Retry Values
#define | PHPAL_I14443P4A_RATS_RETRY_MAX 1
| Maximum retry value of RATS during transmission and timeout error. More...
#define | PHPAL_I14443P4A_RATS_RETRY_MIN 0
| Minimum retry value of RATS during transmission and timeout error. More...

## Detailed Description

These Components configure PHPAL_I14443P4A.

These Components implement the additional ISO/IEC 14443-4 activation steps needed for ISO14443 Type-A cards.

## Macro Definition Documentation

## § PHPAL_I14443P4A_CONFIG_OPE_MODE

#define PHPAL_I14443P4A_CONFIG_OPE_MODE 0x01

Configure Operation Mode for this Layer.

Possible values are
RD_LIB_MODE_EMVCO,
RD_LIB_MODE_NFC,
RD_LIB_MODE_ISO,
Default value is RD_LIB_MODE_NFC.

## § PHPAL_I14443P4A_CONFIG_RATS_RETRY_COUNT

#define PHPAL_I14443P4A_CONFIG_RATS_RETRY_COUNT 0x02

Configure retry count for RATS command.

Possible values are
PHPAL_I14443P4A_RATS_RETRY_MIN,
PHPAL_I14443P4A_RATS_RETRY_MAX,
Default value is PHPAL_I14443P4A_RATS_RETRY_MAX.
For mode RD_LIB_MODE_EMVCO retry count should be 1.

## § PHPAL_I14443P4A_DATARATE_106

#define PHPAL_I14443P4A_DATARATE_106 0x00U

DRI/DSI value for 106 kBit/s.

## § PHPAL_I14443P4A_DATARATE_212

#define PHPAL_I14443P4A_DATARATE_212 0x01U

DRI/DSI value for 212 kBit/s.

## § PHPAL_I14443P4A_DATARATE_424

#define PHPAL_I14443P4A_DATARATE_424 0x02U

DRI/DSI value for 424 kBit/s.

## § PHPAL_I14443P4A_DATARATE_848

#define PHPAL_I14443P4A_DATARATE_848 0x03U

DRI/DSI value for 848 kBit/s.

## § PHPAL_I14443P4A_RATS_RETRY_MAX

#define PHPAL_I14443P4A_RATS_RETRY_MAX 1

Maximum retry value of RATS during transmission and timeout error.

## § PHPAL_I14443P4A_RATS_RETRY_MIN

#define PHPAL_I14443P4A_RATS_RETRY_MIN 0

Minimum retry value of RATS during transmission and timeout error.

## Function Documentation

## § phpalI14443p4a_Rats()

phStatus_t phpalI14443p4a_Rats | ( | void * | pDataParams,
|  | uint8_t | bFsdi,
|  | uint8_t | bCid,
|  | uint8_t * | pAts
| ) |  |

Perform a ISO14443-4A "Request Answer to Select" command.

    [FSDI to FSD conversion]
    ---------------------------------------------------------------
    FSDI         | 00 | 01 | 02 | 03 | 04 | 05 | 06 | 07  | 08  |
    ---------------------------------------------------------------
    FSD (bytes)  | 16 | 24 | 32 | 40 | 48 | 64 | 96 | 128 | 256 |
    ---------------------------------------------------------------

Returns
  Status code

Return values

  PH_ERR_SUCCESS | Operation successful.
  PH_ERR_PROTOCOL_ERROR | Invalid response received.
  Other | Depending on implementation and underlying component.

Parameters

  [in] | pDataParams | Pointer to this layer's parameter structure.
  [in] | bFsdi | Frame Size Integer; 0-8.
  [in] | bCid | Card Identifier; 0-14.
  [out] | pAts | Answer to Select; uint8_t[255].

## § phpalI14443p4a_Pps()

phStatus_t phpalI14443p4a_Pps | ( | void * | pDataParams,
|  | uint8_t | bDri,
|  | uint8_t | bDsi
| ) |  |

Perform a ISO14443-4A "Protocol and Parameter Selection" command.

The following values for `bDri` and `bDsi` are possible:

- PHPAL_I14443P4A_DATARATE_106
- PHPAL_I14443P4A_DATARATE_212
- PHPAL_I14443P4A_DATARATE_424
- PHPAL_I14443P4A_DATARATE_848

Returns
  Status code

Return values

  PH_ERR_SUCCESS | Operation successful.
  PH_ERR_PROTOCOL_ERROR | Invalid response received.
  Other | Depending on implementation and underlying component.

Parameters

  [in] | pDataParams | Pointer to this layer's parameter structure.
  [in] | bDri | Divisor Receive (PCD to PICC) Integer; 0-3.
  [in] | bDsi | Divisor Send (PICC to PCD) Integer; 0-3.

## § phpalI14443p4a_ActivateCard()

phStatus_t phpalI14443p4a_ActivateCard | ( | void * | pDataParams,
|  | uint8_t | bFsdi,
|  | uint8_t | bCid,
|  | uint8_t | bDri,
|  | uint8_t | bDsi,
|  | uint8_t * | pAts
| ) |  |

Perform ISO14443-4A Rats and Pps commands.

Returns
  Status code

Return values

  PH_ERR_SUCCESS | Operation successful.
  PH_ERR_PROTOCOL_ERROR | Invalid response received.
  PH_ERR_FRAMING_ERROR | Bcc invalid.
  Other | Depending on implementation and underlying component.

Parameters

  [in] | pDataParams | Pointer to this layer's parameter structure.
  [in] | bFsdi | Frame Size Integer; 0-8.
  [in] | bCid | Card Identifier; 0-14.
  [in] | bDri | Divisor Receive (PCD to PICC) Integer; 0-3.
  [in] | bDsi | Divisor Send (PICC to PCD) Integer; 0-3.
  [out] | pAts | Answer to Select; uint8_t[255].

## § phpalI14443p4a_GetProtocolParams()

phStatus_t phpalI14443p4a_GetProtocolParams | ( | void * | pDataParams,
|  | uint8_t * | pCidEnabled,
|  | uint8_t * | pCid,
|  | uint8_t * | pNadSupported,
|  | uint8_t * | pFwi,
|  | uint8_t * | pFsdi,
|  | uint8_t * | pFsci
| ) |  |

Retrieve the ISO14443-4A protocol parameters.

Returns
  Status code

Return values

  PH_ERR_SUCCESS | Operation successful.

Parameters

  [in] | pDataParams | Pointer to this layer's parameter structure.
  [out] | pCidEnabled | Unequal '0' if Card Identifier is enabled.
  [out] | pCid | Card Identifier.
  [out] | pNadSupported | Node Address Support; Unequal '0' if supported.
  [out] | pFwi | Frame Waiting Integer.
  [out] | pFsdi | PCD Frame Size Integer; 0-8.
  [out] | pFsci | PICC Frame Size Integer; 0-8.

## § phpalI14443p4a_SetConfig()

phStatus_t phpalI14443p4a_SetConfig | ( | void * | pDataParams,
|  | uint16_t | wConfig,
|  | uint16_t | wValue
| ) |  |

Set configuration parameter.

Returns
  Status code

Return values

  PH_ERR_SUCCESS | Operation successful.
  Other | Depending on implementation and underlying component.

Parameters

  [in] | pDataParams | Pointer to this layers parameter structure.
  [in] | wConfig | Configuration Identifier.
  [in] | wValue | Configuration Value.