These are the Components which are used to abstract the functionality of the physical reader device to a generic interface. More...

Modules | |
| Examples | |
| Example code to configure HAL and BAL for various reader(s). | |
| Component : Callback | |
| Callback Reader HAL. | |
| Component : DUT | |
| any Reader HAL | |
| Component : LicenseeWrapper | |
| Licensee Wrapper HAL. | |
| Component : MfcCrypto | |
| MfcCrypto Reader HAL. | |
| Component : Pcsc | |
| PCSC HAL component. | |
| Component : Rc523 | |
| RC523 Reader HAL. | |
| Component : Rc632 | |
| RC632 Reader HAL. | |
| Component : Rc663 | |
| RC663 Reader HAL. | |
| Component : Rd70x | |
| RD70x (Pegoda1) Reader HAL. | |
| Component : Rd710 | |
| RD710 (Pegoda2) Reader HAL. | |
| Component : RdCardSim | |
| RdCardSim Reader HAL. | |
| Component : SamAV2 | |
| SamAV2 Reader HAL. | |
| Component : SamAV3 | |
| SamAV3 Reader HAL. | |
| CommunicationType | |
| Sam macros to configure communication type. The macros to be used if configuration identifier is Communication Type for the below mentioned interfaces. | |
| I2C_BitRate | |
| Sam macros to configure I2C BitRate. The macros to be used if configuration identifier is I2C BitRate for the below mentioned interfaces. | |
Functions | |
| phStatus_t | phhalHw_Exchange (void *pDataParams, uint16_t wOption, uint8_t *pTxBuffer, uint16_t wTxLength, uint8_t **ppRxBuffer, uint16_t *pRxLength) |
| Perform Data Exchange with Picc. More... | |
| phStatus_t | phhalHw_WriteRegister (void *pDataParams, uint8_t bAddress, uint8_t bValue) |
| Write value to register address. More... | |
| phStatus_t | phhalHw_ReadRegister (void *pDataParams, uint8_t bAddress, uint8_t *pValue) |
| Read value from register address. More... | |
| phStatus_t | phhalHw_ExecuteCmd (void *pDataParams, uint8_t bCmd, uint16_t wOption, uint8_t bIrq0WaitFor, uint8_t bIrq1WaitFor, uint8_t *pTxBuffer, uint16_t wTxLength, uint16_t wRxBufferSize, uint8_t *pRxBuffer, uint16_t *pRxLength) |
| Execute bCmd command with pTxBuffer parameters. More... | |
| phStatus_t | phhalHw_ApplyProtocolSettings (void *pDataParams, uint8_t bCardType) |
| Apply protocol settings. More... | |
| phStatus_t | phhalHw_MfcAuthenticateKeyNo (void *pDataParams, uint8_t bBlockNo, uint8_t bKeyType, uint16_t wKeyNo, uint16_t wKeyVersion, uint8_t *pUid) |
| Perform MIFARE(R) Classic Authentication using a key number. More... | |
| phStatus_t | phhalHw_MfcAuthenticate (void *pDataParams, uint8_t bBlockNo, uint8_t bKeyType, uint8_t *pKey, uint8_t *pUid) |
| Perform MIFARE(R) Classic Authentication using a key. More... | |
| phStatus_t | phhalHw_SetConfig (void *pDataParams, uint16_t wConfig, uint16_t wValue) |
| Set configuration parameter. More... | |
| phStatus_t | phhalHw_GetConfig (void *pDataParams, uint16_t wConfig, uint16_t *pValue) |
| Get configuration parameter. More... | |
| phStatus_t | phhalHw_FieldOn (void *pDataParams) |
| Switch on the RF-field. More... | |
| phStatus_t | phhalHw_FieldOff (void *pDataParams) |
| Switch off the RF-field. More... | |
| phStatus_t | phhalHw_FieldReset (void *pDataParams) |
| Perform RF-Reset. More... | |
| phStatus_t | phhalHw_Wait (void *pDataParams, uint8_t bUnit, uint16_t wTimeout) |
| Blocks until the time given by wTimeout elapsed. More... | |
| phStatus_t | phhalHw_I18000p3m3Inventory (void *pDataParams, uint8_t *pSelCmd, uint8_t bSelCmdLen, uint8_t bNumValidBitsinLastByte, uint8_t *pBeginRndCmd, uint8_t bTSprocessing, uint8_t **ppRxBuffer, uint16_t *wRxBufferLen) |
| ISO 18000p3m3 Inventory command. More... | |
| phStatus_t | phhalHw_I18000p3m3ResumeInventory (void *pDataParams, uint8_t **ppRxBuffer, uint16_t *wRxBufferLen) |
| ISO 18000p3m3 resume inventory command. More... | |
| phStatus_t | phhalHw_ReadEEPROM (void *pDataParams, uint16_t wOption, uint32_t dwAddr_ProtIndex, uint32_t dwNoOfBytesToRead, uint8_t **ppResponse, uint16_t *pRespLen) |
| Reads the EEPROM information. More... | |
| phStatus_t | phhalHw_WriteEEPROM (void *pDataParams, uint16_t wOption, uint32_t dwStartAddr, uint8_t *pData, uint16_t wDataLen) |
| Writes the EEPROM information. More... | |
Communication Configs | |
| #define | PHHAL_HW_CONFIG_PARITY 0x0000U |
| Enable or Disable Parity. | |
| #define | PHHAL_HW_CONFIG_TXCRC 0x0001U |
| Enable or Disable TxCrc. | |
| #define | PHHAL_HW_CONFIG_RXCRC 0x0002U |
| Enable or Disable RxCrc. | |
| #define | PHHAL_HW_CONFIG_TXLASTBITS 0x0003U |
| Set number of valid bits of last Tx-Byte. | |
| #define | PHHAL_HW_CONFIG_RXLASTBITS 0x0004U |
| Get number of valid bits of last Rx-Byte. | |
| #define | PHHAL_HW_CONFIG_RXALIGN 0x0005U |
| Set Rx-Aligned Bits. | |
| #define | PHHAL_HW_CONFIG_RXDEAFBITS 0x0006U |
| Configure Receiver Deaf-Time in ETUs. | |
| #define | PHHAL_HW_CONFIG_TXWAIT_US 0x0007U |
| Set TxWait (= time between last RxIrq and Tx of succeeding frame) in microseconds. | |
| #define | PHHAL_HW_CONFIG_CLEARBITSAFTERCOLL 0x0008U |
| Enable or Disable clearing of bits after coll. | |
| #define | PHHAL_HW_CONFIG_TXDATARATE 0x0009U |
| Configure Data-Rate for Transmission. | |
| #define | PHHAL_HW_CONFIG_RXDATARATE 0x000AU |
| Configure Data-Rate for Reception. | |
| #define | PHHAL_HW_CONFIG_MODINDEX 0x000BU |
| Set modulation index (unit and value are hardware-dependent). | |
| #define | PHHAL_HW_CONFIG_ASK100 0x000CU |
| Enable (PH_ON) or disable (PH_OFF) 100% modulation. | |
| #define | PHHAL_HW_CONFIG_TIMEOUT_VALUE_US 0x000DU |
| Set RC Timeout (in [us]). | |
| #define | PHHAL_HW_CONFIG_TIMEOUT_VALUE_MS 0x000EU |
| Set RC Timeout (in [ms]). | |
| #define | PHHAL_HW_CONFIG_SUBCARRIER 0x000FU |
| Subcarrier setting for ISO 15693. | |
| #define | PHHAL_HW_CONFIG_TIMING_MODE 0x0010U |
| Set the timing mode. | |
| #define | PHHAL_HW_CONFIG_TIMING_US 0x0011U |
| Retrieve elapsed time of RC timer ([us]). | |
| #define | PHHAL_HW_CONFIG_TIMING_MS 0x0012U |
| Retrieve elapsed time of RC timer ([ms]). | |
| #define | PHHAL_HW_CONFIG_FIELD_OFF_TIME 0x0013U |
Set the field off time for field-reset ([ms]); Note: A value of 0 is not allowed. | |
| #define | PHHAL_HW_CONFIG_FIELD_RECOVERY_TIME 0x0014U |
Set the field recovery time for field-reset ([ms]); Note: For ISO15693 operation, this should be at least set to 1ms. | |
| #define | PHHAL_HW_CONFIG_SYMBOL_START 0x0015U |
| Disable / Set the SOF symbol of a frame. | |
| #define | PHHAL_HW_CONFIG_SYMBOL_END 0x0016U |
| Disable / Set the EOF symbol of a frame. | |
| #define | PHHAL_HW_CONFIG_TIMER_DEVIATION_PROXIMITY_CHECK 0x8013U |
| Configure the Timer deviation percentage. More... | |
| #define | PHHAL_HW_CONFIG_ASYNCHRONOUS_IN_REPLY_PROCESS 0x8014U |
| Enable/Disable Handling of ISO-15693 ASynchronous In-Reply process command. | |
Sets the CRC type for Tx(PHHAL_HW_CONFIG_TXCRC) and Rx(PHHAL_HW_CONFIG_RXCRC). Values can be one of | |
| #define | PHHAL_HW_CONFIG_CRCTYPE 0x0017U |
| #define | PHHAL_HW_CONFIG_FRAME_SYNC 0x0017U |
| Set Frame Sync for Rc663. | |
| #define | PHHAL_HW_CONFIG_TXDATANUM 0x0018U |
| Tranmitter Data number register. | |
| #define | PHHAL_HW_CONFIG_CARD_TYPE 0x0019U |
| Getter for the current card type. | |
| #define | PHHAL_HW_CONFIG_SET_READER_IC 0x0020U |
| Gets or Set the Reader IC information. More... | |
| #define | PHHAL_HW_CONFIG_DISABLE_MF_CRYPTO1 0x002EU |
| Disable MIFARE(R) Classic Crypto1. | |
| #define | PHHAL_HW_CONFIG_ADDITIONAL_INFO 0x002FU |
| Set / Get additional information. | |
| #define | PHHAL_HW_CONFIG_RXBUFFER_STARTPOS 0x0030U |
| Start position of RX buffer to be used (never changed by HAL). | |
| #define | PHHAL_HW_CONFIG_RXBUFFER_BUFSIZE 0x0031U |
| Buffer size of RX buffer set at Init. | |
| #define | PHHAL_HW_CONFIG_TXBUFFER_BUFSIZE 0x0032U |
| Buffer size of TX buffer set at Init. | |
| #define | PHHAL_HW_CONFIG_TXBUFFER_LENGTH 0x0033U |
| Amount of valid bytes in TX buffer. | |
| #define | PHHAL_HW_CONFIG_TXBUFFER 0x0034U |
| Access the TxBuffer at the address defined by PHHAL_HW_CONFIG_ADDITIONAL_INFO. | |
| #define | PHHAL_HW_CONFIG_MAX_PRECACHED_BYTES 0x0035U |
| Configures the max. More... | |
| #define | PHHAL_HW_CONFIG_BAL_CONNECTION 0x0040U |
| Set the BAL connection type. More... | |
| #define | PHHAL_HW_CONFIG_SERIAL_BITRATE 0x0041U |
| Bitrate for serial communication. | |
| #define | PHHAL_HW_CONFIG_RFRESET_ON_TIMEOUT 0x0050U |
| Perform an Rf-Reset in case of a timeout (only for phhalHw_Exchange). | |
| #define | PHHAL_HW_CONFIG_SETMINFDT 0x0051U |
| Set/Reset minimum FDT (only for PC) | |
Enable symbol send (PH_ON).
| |
| #define | PHHAL_HW_CONFIG_SET_SYMBOL_SEND 0x005DU |
| #define | PHHAL_HW_CONFIG_COMMUNICATION_CONFIG 0x0089U |
| Change the setting for the Socket communication (only for phhalHw_Exchange in combination with RdCardSim). | |
Configuration for I2C communication | |
| #define | PHHAL_HW_CONFIG_SAM_COMMUNICATION_TYPE 0x0060U |
| Configure communication type. More... | |
| #define | PHHAL_HW_CONFIG_I2C_SLAVE_ADDRESS 0x0061U |
| Config the I2C Slave address to be used. | |
| #define | PHHAL_HW_CONFIG_I2C_BITRATE 0x0062U |
| Config the Data-Rate for I2C communication. More... | |
| #define | PHHAL_HW_CONFIG_I2C_TIMEOUT_MS 0x0063U |
| Configure I2C polling Timeout in terms of millisecond. | |
Custom Error Codes (start with offset higher than max value of PHHAL_HW_SAMAV2_ERR/PHHAL_HW_SAMAV3_ERR error codes | |
| #define | PHHAL_HW_ISO3_ERR_ISO3 (PH_ERR_CUSTOM_BEGIN + 48) |
| Non standard error. More... | |
| #define | PHHAL_HW_ISO3_ERR_IIR_FILTER_OVERFLOW (PH_ERR_CUSTOM_BEGIN + 49) |
| IIR filter overflow error. | |
| #define | PHHAL_HW_ISO3_ERR_INCOMPATIBLE_SERVER_VERSION (PH_ERR_CUSTOM_BEGIN + 50) |
| Incompatible server version for current ISO3 driver implementation. | |
| #define | PHHAL_HW_ISO3_ERR_INCOMPATIBLE_FPGA_VERSION (PH_ERR_CUSTOM_BEGIN + 51) |
| Incompatible FPGA version for current ISO3 driver implementation. | |
| #define | PHHAL_HW_RDFPGAV6_ERR_DLL (PH_ERR_CUSTOM_BEGIN + 52) |
| phCDllReader.dll threw an non standard error read wAddionalInfo to get error code. | |
| #define | PHHAL_HW_MP300_ERR_MP300 (PH_ERR_CUSTOM_BEGIN + 53) |
| Non standard error. More... | |
| #define | PHHAL_HW_MP300_ERR_ADJUST_RX_CHANNEL_2 (PH_ERR_CUSTOM_BEGIN + 54) |
| Adjust rx Channel failed. | |
| #define | PHHAL_HW_MP300_ERR_FDT_METHODE2_NOT_SUPPORTED (PH_ERR_CUSTOM_BEGIN + 55) |
| FDT Measurement methode 2 is not supported with the current response. | |
Card Configs | |
| #define | PHHAL_HW_CARDTYPE_CURRENT 0x0000U |
| Re-Apply settings for current Communication Mode. | |
| #define | PHHAL_HW_CARDTYPE_ISO14443A 0x0001U |
| ISO/IEC 14443A Mode. | |
| #define | PHHAL_HW_CARDTYPE_ISO14443B 0x0002U |
| ISO/IEC 14443B Mode. | |
| #define | PHHAL_HW_CARDTYPE_FELICA 0x0003U |
| Felica (JIS X 6319) Mode. | |
| #define | PHHAL_HW_CARDTYPE_ISO15693 0x0004U |
| ISO/IEC 15693 Mode. | |
| #define | PHHAL_HW_CARDTYPE_ICODEEPCUID 0x0005U |
| NXP I-Code EPC/UID Mode. | |
| #define | PHHAL_HW_CARDTYPE_I18000P3M3 0x0006U |
| ISO/IEC 18000-3 Mode3. | |
| #define | PHHAL_HW_CARDTYPE_I18092MPI 0x0007U |
| ISO/IEC ISO18092 (NFC) Passive Initiator Mode. | |
| #define | PHHAL_HW_CARDTYPE_I18092MPT 0x0008U |
| ISO/IEC ISO18092 (NFC) Passive Target Mode. | |
CRC Values | |
| #define | PHHAL_HW_CRCTYPE_CRC5 0x0001U |
| 5 bit length, polynomial x^5+x^3+1U, preset value 01001b, residue 00000b. | |
| #define | PHHAL_HW_CRCTYPE_CRC16 0x0002U |
| ISO/IEC 13239, 16 bit length, polynomial x^16+x^12+x^5+1U, preset value 0xFFFF, residue 0x1D0F. | |
| #define | PHHAL_HW_CRCOPTION_INVERTED 0x0100U |
| To indicate that the CRC generated should be inverted. More... | |
Rf Datarate Values | |
| #define | PHHAL_HW_RF_DATARATE_106 0x0000U |
| Data rate setting for 106 kBit/s. | |
| #define | PHHAL_HW_RF_DATARATE_212 0x0001U |
| Data rate setting for 212 kBit/s. | |
| #define | PHHAL_HW_RF_DATARATE_424 0x0002U |
| Data rate setting for 424 kBit/s. | |
| #define | PHHAL_HW_RF_DATARATE_848 0x0003U |
| Data rate setting for 848 kBit/s. | |
| #define | PHHAL_HW_RF_DATARATE_1695 0x0004U |
| Data rate setting for 1695 kBit/s. | |
| #define | PHHAL_HW_RF_DATARATE_3390 0x0005U |
| Data rate setting for 3390 kBit/s. | |
| #define | PHHAL_HW_RF_DATARATE_6780 0x0006U |
| Data rate setting for 6780 kBit/s. | |
| #define | PHHAL_HW_RF_TX_DATARATE_1_OUT_OF_256 0x000AU |
| Data rate setting for ISO15693 '1 out of 256' mode. More... | |
| #define | PHHAL_HW_RF_TX_DATARATE_1_OUT_OF_4 0x000BU |
| Data rate setting for ISO15693 '1 out of 4' mode. More... | |
| #define | PHHAL_HW_RF_RX_DATARATE_LOW 0x000CU |
| Data rate setting for ISO15693 low datarate. | |
| #define | PHHAL_HW_RF_RX_DATARATE_HIGH 0x000DU |
| Data rate setting for ISO15693 high datarate. | |
| #define | PHHAL_HW_RF_RX_DATARATE_FAST_LOW 0x000EU |
| Data rate setting for ISO15693 fast (low*2) datarate (FAST INVENTORY (PAGE) READ). | |
| #define | PHHAL_HW_RF_RX_DATARATE_FAST_HIGH 0x000FU |
| Data rate setting for ISO15693 fast (high*2) datarate (FAST INVENTORY (PAGE) READ). | |
| #define | PHHAL_HW_RF_DATARATE_EPCUID 0x0010U |
| Data rate setting for EPC/UID. | |
| #define | PHHAL_HW_RF_TX_DATARATE_I18000P3M3 0x0011U |
| Tx Data rate setting for ISO18000-3 Mode3. | |
| #define | PHHAL_HW_RF_RX_DATARATE_I18000P3M3_MAN2 0x0012U |
| Rx Data rate setting for ISO18000-3 Mode3 Manchester 2SCP. | |
| #define | PHHAL_HW_RF_RX_DATARATE_I18000P3M3_MAN4 0x0013U |
| Rx Data rate setting for ISO18000-3 Mode3 Manchester 4SCP. | |
| #define | PHHAL_HW_RX_I18000P3M3_FL_423_MAN2 0x0013U |
| ICode ISO18000-3 Mode3 424 kBit/s (M=2). | |
| #define | PHHAL_HW_RX_I18000P3M3_FL_847_MAN2 0x0014U |
| ICode ISO18000-3 Mode3 847 kBit/s (M=2). | |
| #define | PHHAL_HW_RX_I18000P3M3_FL_423_MAN4 0x0015U |
| ICode ISO18000-3 Mode3 424 kBit/s (M=4). | |
| #define | PHHAL_HW_RX_I18000P3M3_FL_847_MAN4 0x0016U |
| ICode ISO18000-3 Mode3 847 kBit/s (M=4). | |
| #define | PHHAL_HW_RF_TX_DATARATE_1_OUT_OF_4_53 0x0017U |
| Data rate setting for ISO15693 '1 out of 4' mode. More... | |
| #define | PHHAL_HW_RF_TX_DATARATE_1_OUT_OF_4_106 0x0018U |
| Data rate setting for ISO15693 '1 out of 4' mode. More... | |
| #define | PHHAL_HW_RF_TX_DATARATE_1_OUT_OF_4_212 0x0019U |
| Data rate setting for ISO15693 '1 out of 4' mode. More... | |
| #define | PHHAL_HW_RF_I15693_53KBPS_DATARATE 0x001BU |
| Data rate setting for 53 kbps. More... | |
Rf Subcarrier Values | |
| #define | PHHAL_HW_SUBCARRIER_SINGLE 0x0000U |
| Sub carrier setting for ISO15693 single subcarrier. | |
| #define | PHHAL_HW_SUBCARRIER_DUAL 0x0001U |
| Sub carrier setting for ISO15693 / EPC V2 dual subcarrier. | |
| #define | PHHAL_HW_SUBCARRIER_QUAD 0x0002U |
| Sub carrier setting for EPC V2 quad subcarrier. | |
Time Units | |
| #define | PHHAL_HW_TIME_MICROSECONDS 0x0000U |
| Time in microseconds (us). | |
| #define | PHHAL_HW_TIME_MILLISECONDS 0x0001U |
| Time in milliseconds (ms). | |
Timing Mode settings | |
| #define | PHHAL_HW_TIMING_MODE_OFF 0x0000U |
| Time Measurement disabled. | |
| #define | PHHAL_HW_TIMING_MODE_FDT 0x0001U |
| Measures time from Tx-End until Rx-Begin. | |
| #define | PHHAL_HW_TIMING_MODE_COMM 0x0002U |
| Measures the duration of the complete communication. | |
| #define | PHHAL_HW_TIMING_MODE_OPTION_MASK 0xFF00U |
| Additional option-mask for time measurement. | |
| #define | PHHAL_HW_TIMING_MODE_OPTION_DEFAULT 0x0000U |
| The timing value is cummulated on each Exchange until it gets retrieved by phhalHw_GetConfig. | |
| #define | PHHAL_HW_TIMING_MODE_OPTION_AUTOCLEAR 0x0100U |
| Automatically resets the current timing value prior to any communication. | |
Field Reset default times | |
| #define | PHHAL_HW_FIELD_OFF_DEFAULT 0x0005U |
| Default Field-Off time. | |
| #define | PHHAL_HW_FIELD_RECOVERY_DEFAULT 0x0005U |
| Default Field-Recovery time. | |
Frame Symbols (use #PH_OFF to disable) | |
| #define | PHHAL_HW_SYMBOL_ICODEEPCUID_SSOF 0x0001U |
| ICode EPC/UID Short Start Of Frame. | |
| #define | PHHAL_HW_SYMBOL_ICODEEPCUID_LSOF 0x0002U |
| ICode EPC/UID Long Start Of Frame. | |
| #define | PHHAL_HW_SYMBOL_ICODEEPCUID_CEOF 0x0003U |
| ICode EPC/UID Common End Of Frame. | |
| #define | PHHAL_HW_SYMBOL_ICODEEPCUID_CS 0x0004U |
| ICode EPC/UID Close Slot. | |
| #define | PHHAL_HW_SYMBOL_I15693_SOF 0x0005U |
| ISO15693 SOF (aumatically choosen between 1/256 and 1/4). | |
| #define | PHHAL_HW_SYMBOL_I18000P3M3_PREAMBLE 0x0006U |
| ISO18000-3 Mode3 Preamble. | |
| #define | PHHAL_HW_SYMBOL_I18000P3M3_FSYNC 0x0007U |
| ISO18000-3 Mode3 Frame-Sync. | |
MIFARE Classic Authenticate Options | |
| #define | PHHAL_HW_MFC_KEYA 0x0AU |
| MIFARE Classic Key Type A. | |
| #define | PHHAL_HW_MFC_KEYB 0x0BU |
| MIFARE Classic Key Type B. | |
| #define | PHHAL_HW_MFC_KEY_LENGTH 0x06U |
| Length of a MIFARE Classic key (for completeness). | |
BAL Connection types | |
| #define | PHHAL_HW_BAL_CONNECTION_RS232 0x0000U |
| ReaderIC is connected via RS232. | |
| #define | PHHAL_HW_BAL_CONNECTION_SPI 0x0001U |
| ReaderIC is connected via SPI. | |
| #define | PHHAL_HW_BAL_CONNECTION_I2C 0x0002U |
| ReaderIC or SAM is connected via I2C. | |
RS232 Bitrate Values | |
| #define | PHHAL_HW_RS232_BITRATE_7200 0x0000U |
| 7.200 kBit/s. | |
| #define | PHHAL_HW_RS232_BITRATE_9600 0x0001U |
| 9.600 kBit/s. | |
| #define | PHHAL_HW_RS232_BITRATE_14400 0x0002U |
| 14.400 kBit/s. | |
| #define | PHHAL_HW_RS232_BITRATE_19200 0x0003U |
| 19.200 kBit/s. | |
| #define | PHHAL_HW_RS232_BITRATE_38400 0x0004U |
| 38.400 kBit/s. | |
| #define | PHHAL_HW_RS232_BITRATE_57600 0x0005U |
| 57.500 kBit/s. | |
| #define | PHHAL_HW_RS232_BITRATE_115200 0x0006U |
| 115.200 kBit/s. | |
| #define | PHHAL_HW_RS232_BITRATE_128000 0x0007U |
| 128.000 kBit/s. | |
| #define | PHHAL_HW_RS232_BITRATE_230400 0x0008U |
| 230.400 kBit/s. | |
| #define | PHHAL_HW_RS232_BITRATE_460800 0x0009U |
| 460.800 kBit/s. | |
| #define | PHHAL_HW_RS232_BITRATE_921600 0x000AU |
| 921.600 kBit/s. | |
| #define | PHHAL_HW_RS232_BITRATE_1228800 0x000BU |
| 1.228.800 kBit/s. | |
Min FDT values | |
| #define | PHHAL_HW_MINFDT_106_US (91 + 10) |
| (n * 128 + 84) / 13.56; n = 9. | |
| #define | PHHAL_HW_MINFDT_212_US (87 + 40) |
| (n * 128 + 148) / 13.56; n = 8. | |
| #define | PHHAL_HW_MINFDT_424_US (84 + 35) |
| (n * 128 + 116) / 13.56; n = 8. | |
| #define | PHHAL_HW_MINFDT_848_US (83 + 45) |
| (n * 128 + 100) / 13.56; n = 8. | |
Parameter values for ISO/IEC 18000p3m3 HAL APIs \n | |
| #define | PHHAL_HW_I18000P3M3_GET_MAX_RESPS 0U |
| Gets responses from more than one slots limited by the RX buffer size and number of slots. | |
| #define | PHHAL_HW_I18000P3M3_ONE_TS_ONLY 1U |
| Gets response for only one time slot. | |
| #define | PHHAL_HW_I18000P3M3_GET_TAG_HANDLE 2U |
| Gets response for only one time slot. More... | |
| #define | PHHAL_HW_I18000P3M3_PERFORM_RESIZE 3U |
| Perform Resize Round. | |
| #define | PHHAL_HW_I18000P3M3_SESSION_S0 0x00U |
| Session S0. | |
| #define | PHHAL_HW_I18000P3M3_SESSION_S2 0x02U |
| Session S2. | |
| #define | PHHAL_HW_I18000P3M3_TARGET_INVENTORIED_S0 0x00U |
| INVENTORIED_S0 target. | |
| #define | PHHAL_HW_I18000P3M3_TARGET_INVENTORIED_S2 0x02U |
| INVENTORIED_S2 target. | |
| #define | PHHAL_HW_I18000P3M3_TARGET_SL 0x04U |
| SL target. | |
| #define | PHHAL_HW_I18000P3M3_UPDN_INCREMENT 0x06U |
| Increment Q. | |
| #define | PHHAL_HW_I18000P3M3_UPDN_NOCHANGE 0x00U |
| Do not change Q. | |
| #define | PHHAL_HW_I18000P3M3_UPDN_DECREMENT 0x03U |
| Decrement Q. | |
| #define | PHHAL_HW_I18000P3M3_CMD_RESIZE_ROUND 0x09U |
| ResizeRound command code. | |
These are the Components which are used to abstract the functionality of the physical reader device to a generic interface.
| #define PHHAL_HW_CONFIG_TIMER_DEVIATION_PROXIMITY_CHECK 0x8013U |
Configure the Timer deviation percentage.
This configuration should be used while performing ProximityCheck command.
| #define PHHAL_HW_CONFIG_SET_READER_IC 0x0020U |
Gets or Set the Reader IC information.
This will be helpful in Sam is connected in X mode.
| #define PHHAL_HW_CONFIG_MAX_PRECACHED_BYTES 0x0035U |
Configures the max.
number of bytes which are precached prior to command execution.
| #define PHHAL_HW_CONFIG_BAL_CONNECTION 0x0040U |
Set the BAL connection type.
The default value is always PHHAL_HW_BAL_CONNECTION_RS232.
| #define PHHAL_HW_CONFIG_I2C_BITRATE 0x0062U |
Config the Data-Rate for I2C communication.
Supported values are
| #define PHHAL_HW_ISO3_ERR_ISO3 (PH_ERR_CUSTOM_BEGIN + 48) |
Non standard error.
Read wAddionalInfo to get error code.
| #define PHHAL_HW_MP300_ERR_MP300 (PH_ERR_CUSTOM_BEGIN + 53) |
Non standard error.
Read wAddionalInfo to get error code.
| #define PHHAL_HW_CRCOPTION_INVERTED 0x0100U |
To indicate that the CRC generated should be inverted.
This should be ORed with the CRCTYPEs above.
| #define PHHAL_HW_RF_TX_DATARATE_1_OUT_OF_256 0x000AU |
Data rate setting for ISO15693 '1 out of 256' mode.
1.66kb/s
| #define PHHAL_HW_RF_TX_DATARATE_1_OUT_OF_4 0x000BU |
Data rate setting for ISO15693 '1 out of 4' mode.
26 kb/s
| #define PHHAL_HW_RF_TX_DATARATE_1_OUT_OF_4_53 0x0017U |
Data rate setting for ISO15693 '1 out of 4' mode.
53 kb/s
| #define PHHAL_HW_RF_TX_DATARATE_1_OUT_OF_4_106 0x0018U |
Data rate setting for ISO15693 '1 out of 4' mode.
106 kb/s
| #define PHHAL_HW_RF_TX_DATARATE_1_OUT_OF_4_212 0x0019U |
Data rate setting for ISO15693 '1 out of 4' mode.
212 kb/s
| #define PHHAL_HW_RF_I15693_53KBPS_DATARATE 0x001BU |
Data rate setting for 53 kbps.
Used for Testing
| #define PHHAL_HW_I18000P3M3_GET_TAG_HANDLE 2U |
Gets response for only one time slot.
Also sends a ReqRN to get the tag handle for this slot.
| phStatus_t phhalHw_Exchange | ( | void * | pDataParams, |
| uint16_t | wOption, | ||
| uint8_t * | pTxBuffer, | ||
| uint16_t | wTxLength, | ||
| uint8_t ** | ppRxBuffer, | ||
| uint16_t * | pRxLength | ||
| ) |
Perform Data Exchange with Picc.
wOption can be one of:
wOption can be combined with:
Component : Rc523 Special Behaviour:
If PHHAL_HW_CARDTYPE_I18092MPT is chosen, Exchange performs the reception BEFORE the transmission.
For details refer to Component : Rc523.
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INVALID_PARAMETER | wOption is invalid. |
| PH_ERR_SUCCESS_INCOMPLETE_BYTE | Operation successful, incomplete byte received; Retrieve number of valid bits of last byte with PHHAL_HW_CONFIG_RXLASTBITS. |
| PH_ERR_IO_TIMEOUT | No response detected within the configured time frame. |
| PH_ERR_INTEGRITY_ERROR | Response received but CRC or Parity is invalid. |
| PH_ERR_COLLISION_ERROR | Response received but a collision occured; Retrieve number of valid bits of last byte with PHHAL_HW_CONFIG_RXLASTBITS. |
| PH_ERR_BUFFER_OVERFLOW | Internal receive buffer is too small for transmission or smaller than the response. |
| PH_ERR_FRAMING_ERROR | Frame format is either invalid for configured protocol or corrupted. |
| PH_ERR_PROTOCOL_ERROR | Frame format is definitely invalid for configured protocol. |
| PH_ERR_READ_WRITE_ERROR | Hardware problem. |
| PH_ERR_TEMPERATURE_ERROR | Hardware problem. |
| PH_ERR_RF_ERROR | Hardware problem. |
| PH_ERR_INTERFACE_ERROR | Hardware problem. |
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | wOption | [In] Option parameter. |
| [in] | pTxBuffer | [In] Data to transmit. |
| [in] | wTxLength | [In] Number of bytes to transmit. |
| [out] | ppRxBuffer | [Out] Pointer to received data. |
| [out] | pRxLength | [Out] Number of received data bytes. |
| phStatus_t phhalHw_WriteRegister | ( | void * | pDataParams, |
| uint8_t | bAddress, | ||
| uint8_t | bValue | ||
| ) |
Write value to register address.
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INTERFACE_ERROR | Hardware problem. |
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bAddress | [In] Register Address. |
| [in] | bValue | [In] Register Value. |
| phStatus_t phhalHw_ReadRegister | ( | void * | pDataParams, |
| uint8_t | bAddress, | ||
| uint8_t * | pValue | ||
| ) |
Read value from register address.
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INTERFACE_ERROR | Hardware problem. |
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bAddress | [In] Register Address. |
| [out] | pValue | [Out] Register Value. |
| phStatus_t phhalHw_ExecuteCmd | ( | void * | pDataParams, |
| uint8_t | bCmd, | ||
| uint16_t | wOption, | ||
| uint8_t | bIrq0WaitFor, | ||
| uint8_t | bIrq1WaitFor, | ||
| uint8_t * | pTxBuffer, | ||
| uint16_t | wTxLength, | ||
| uint16_t | wRxBufferSize, | ||
| uint8_t * | pRxBuffer, | ||
| uint16_t * | pRxLength | ||
| ) |
Execute bCmd command with pTxBuffer parameters.
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INTERFACE_ERROR | Hardware problem. |
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bCmd | [In] Command to be executed on the Reader IC. |
| [in] | wOption | [In] Option field for exchange. |
| [in] | bIrq0WaitFor | [In] IRQs on IRQ0 reg to be enabled. |
| [in] | bIrq1WaitFor | [In] IRQs on IRQ1 reg to be enabled. |
| [in] | pTxBuffer | [In] Buffer to be put into the FIFO before executing the command. |
| [in] | wTxLength | [In] Length of the Tx buffer. |
| [in] | wRxBufferSize | [In] Length of Rx buffer. |
| [out] | pRxBuffer | [out] Receive Buffer. |
| [out] | pRxLength | [out] Length of received data(valid). |
| phStatus_t phhalHw_ApplyProtocolSettings | ( | void * | pDataParams, |
| uint8_t | bCardType | ||
| ) |
Apply protocol settings.
To keep the current card type, use PHHAL_HW_CARDTYPE_CURRENT for bCardType.
Component : Rc523 Special Behaviour:
If PHHAL_HW_CARDTYPE_I18092MPT is chosen, Rx- and TxBuffers have to be different.
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INVALID_PARAMETER | bCardType is invalid or not supported. |
| PH_ERR_INTERFACE_ERROR | Hardware problem. |
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bCardType | [In] Type of card for which the HAL should be configured for. |
| phStatus_t phhalHw_MfcAuthenticateKeyNo | ( | void * | pDataParams, |
| uint8_t | bBlockNo, | ||
| uint8_t | bKeyType, | ||
| uint16_t | wKeyNo, | ||
| uint16_t | wKeyVersion, | ||
| uint8_t * | pUid | ||
| ) |
Perform MIFARE(R) Classic Authentication using a key number.
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INVALID_PARAMETER | bKeyType, wKeyNo or wKeyVersion is invalid. |
| PH_ERR_IO_TIMEOUT | Error in authentication. |
| PH_ERR_AUTH_ERROR | Error in authentication. |
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bBlockNo | [In] Blocknumber on card to authenticate to. |
| [in] | bKeyType | [In] Either PHHAL_HW_MFC_KEYA or PHHAL_HW_MFC_KEYB. |
| [in] | wKeyNo | [In] Key number to be used in authentication. |
| [in] | wKeyVersion | [In] Key version to be used in authentication. |
| [in] | pUid | [In] Serial number of current cascade level; uint8_t[4]. |
| phStatus_t phhalHw_MfcAuthenticate | ( | void * | pDataParams, |
| uint8_t | bBlockNo, | ||
| uint8_t | bKeyType, | ||
| uint8_t * | pKey, | ||
| uint8_t * | pUid | ||
| ) |
Perform MIFARE(R) Classic Authentication using a key.
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INVALID_PARAMETER | bKeyType is invalid. |
| PH_ERR_IO_TIMEOUT | Error in authentication. |
| PH_ERR_AUTH_ERROR | Error in authentication. |
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bBlockNo | [In] Blocknumber on card to authenticate to. |
| [in] | bKeyType | [In] Either PHHAL_HW_MFC_KEYA or PHHAL_HW_MFC_KEYB |
| [in] | pKey | [In] Key to be used in authentication. |
| [in] | pUid | [In] Serial number of current cascade level; uint8_t[4]. |
| phStatus_t phhalHw_SetConfig | ( | void * | pDataParams, |
| uint16_t | wConfig, | ||
| uint16_t | wValue | ||
| ) |
Set configuration parameter.
phhalHw_SamAV2 Special Behaviour:
In NonX-Mode every setting (except PHHAL_HW_CONFIG_DISABLE_MF_CRYPTO1 and PHHAL_HW_SAMAV2_CONFIG_HOSTMODE)
is passed on to the linked Reader-HAL.
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_UNSUPPORTED_PARAMETER | Configuration is not supported or invalid. |
| PH_ERR_INVALID_PARAMETER | Parameter value is invalid. |
| PH_ERR_PARAMETER_OVERFLOW | Setting the parameter value would lead to an overflow. |
| PH_ERR_INTERFACE_ERROR | Communication error. |
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | wConfig | [In] Configuration Identifier. |
| [in] | wValue | [In] Configuration Value. |
| phStatus_t phhalHw_GetConfig | ( | void * | pDataParams, |
| uint16_t | wConfig, | ||
| uint16_t * | pValue | ||
| ) |
Get configuration parameter.
phhalHw_SamAV2 Special Behaviour:
In NonX-Mode every query (except PHHAL_HW_CONFIG_RXLASTBITS, PHHAL_HW_CONFIG_DISABLE_MF_CRYPTO1 and PHHAL_HW_SAMAV2_CONFIG_HOSTMODE)
is passed on to the linked Reader-HAL.
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_UNSUPPORTED_PARAMETER | Configuration is not supported or invalid. |
| PH_ERR_INVALID_PARAMETER | Parameter value is invalid. |
| PH_ERR_PARAMETER_OVERFLOW | The parameter value is larger than the range of pValue. |
| PH_ERR_INTERFACE_ERROR | Communication error. |
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | wConfig | [In] Configuration Identifier. |
| [out] | pValue | [Out] Configuration Value. |
| phStatus_t phhalHw_FieldOn | ( | void * | pDataParams | ) |
Switch on the RF-field.
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INTERFACE_ERROR | Communication error. |
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| phStatus_t phhalHw_FieldOff | ( | void * | pDataParams | ) |
Switch off the RF-field.
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INTERFACE_ERROR | Communication error. |
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| phStatus_t phhalHw_FieldReset | ( | void * | pDataParams | ) |
Perform RF-Reset.
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INTERFACE_ERROR | Communication error. |
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| phStatus_t phhalHw_Wait | ( | void * | pDataParams, |
| uint8_t | bUnit, | ||
| uint16_t | wTimeout | ||
| ) |
Blocks until the time given by wTimeout elapsed.
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INVALID_PARAMETER | bUnit is invalid. |
| PH_ERR_INTERFACE_ERROR | Communication error. |
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bUnit | [In] Unit of given timeout value (either PHHAL_HW_TIME_MICROSECONDS or PHHAL_HW_TIME_MILLISECONDS). |
| [in] | wTimeout | [In] Timeout value. |
| phStatus_t phhalHw_I18000p3m3Inventory | ( | void * | pDataParams, |
| uint8_t * | pSelCmd, | ||
| uint8_t | bSelCmdLen, | ||
| uint8_t | bNumValidBitsinLastByte, | ||
| uint8_t * | pBeginRndCmd, | ||
| uint8_t | bTSprocessing, | ||
| uint8_t ** | ppRxBuffer, | ||
| uint16_t * | wRxBufferLen | ||
| ) |
ISO 18000p3m3 Inventory command.
Note: This function does ISO18000p3m3 BeginRound Sends an Ack Optionally sends a ReqRN Stores the information related to tag reply in the HAL RX Buffer Continues with NextSlot or else pauses and returns based on the option specified Can return multi card information based on the configuration option and the size of HAL RX Buffer. The bTSprocessing (Time slot processing behavior) can take the following values
The response is a Pointer to a buffer containing the result of the inventory. The buffer may contain the result of one or more timeslots. Each timeslot result has the following structure: 1 Byte time slot status ( 0 ... Tag response available. 'Tag reply length field', 'Valid bits in last byte field' and 'Tag reply field' are present. 1 ... Tag response available. In addition to three field above, 'Tag handle field' also present. 2 ... No tag replied in timeslot. 'Tag reply length field', 'Valid bits in last byte field' and 'Tag reply field', 'Tag Handle' are not present. 3 ... Two or more tags responded in the timeslot. (Collision). Tag Reply Length, valid bits in last byte and tag reply field not present. ) 1 Byte 'Tag reply' Length (1-66) 1 Byte Valid bits in last Byte (0-7, 0 means all bits are valid) 0-66 Bytes Tag reply 0 or 2 Bytes Handle of the tag, in case the field
A typical sequence in which this API is called is given below
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_IO_TIMEOUT | When there is no tag in the field. |
| PH_ERR_INVALID_PARAMETER | If wrong value specified for bNumValidBits or pBeginRound. |
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | pSelCmd | [In] ISO 18000p3m3 Select command frame. |
| [in] | bSelCmdLen | [In] Select command length in bytes- 1 to 39 bytes. |
| [in] | bNumValidBitsinLastByte | [In] Number of valid bits in last byte of pSelCmd. |
| [in] | pBeginRndCmd | [In] ISO 18000p3m3 BeginRound command frame. This is 17bits i.e., 3 bytes are expected. CRC5 should not be provided. |
| [in] | bTSprocessing | [In] TimeSlot processing behavior. |
| [out] | ppRxBuffer | [Out] Pointer to HAL RX Buffer containing response from single/multiple tags. |
| [out] | wRxBufferLen | [Out] Length of response in HAL RX Buffer. |
| phStatus_t phhalHw_I18000p3m3ResumeInventory | ( | void * | pDataParams, |
| uint8_t ** | ppRxBuffer, | ||
| uint16_t * | wRxBufferLen | ||
| ) |
ISO 18000p3m3 resume inventory command.
Note: This function is to be called after phhalHw_I18000p3m3Inventory. This internally calls the ISO 18000p3m3 NextSlot command once or multiple times to get responses from remaining slots.
Resume inventory also returns the response similar to phhalHw_I18000p3m3Inventory.
A typical sequence in which this API is called is given below
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_IO_TIMEOUT | When there is no tag in the field. |
| PH_ERR_USE_CONDITION | If called when the phhalHw_I18000p3m3 was not called previously with bTSprocessing = PHHAL_HW_I18000P3M3_GET_MAX_RESPS. |
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [out] | ppRxBuffer | [Out] Pointer to HAL Rx Buffer containing response from single/multiple tags. |
| [out] | wRxBufferLen | [Out] Length of response in hal Rx Buffer. |
| phStatus_t phhalHw_ReadEEPROM | ( | void * | pDataParams, |
| uint16_t | wOption, | ||
| uint32_t | dwAddr_ProtIndex, | ||
| uint32_t | dwNoOfBytesToRead, | ||
| uint8_t ** | ppResponse, | ||
| uint16_t * | pRespLen | ||
| ) |
Reads the EEPROM information.
| PH_ERR_SUCCESS | Command successfully executed. |
| PH_ERR_INTERFACE_ERROR | Communication error. |
| PH_ERR_PROTOCOL_ERROR | Invalid frame or unexpected receive data length or command code mismatch. |
| [in] | pDataParams | [IN] Pointer to this layer parameter structure. |
| [in] | wOption | [IN] Options to be used for EEPROM Reading.
|
| [in] | dwAddr_ProtIndex | [IN] The EEPROM address or Protocol Index from where the information should be read. One of the following,
|
| [in] | dwNoOfBytesToRead | [IN] Number of bytes to be read from EEPROM starting from address specified. If Reader is Pegoda -3 and wOption = 0x0020, then zero should be provided. |
| [out] | ppResponse | [OUT] EEPROM information from the mentioned start address (dwStartAddr) until the requested length. Make sure the buffer is allocated for the requested number of bytes (dwLength). |
| [out] | pRespLen | [OUT] Length of bytes available in pResponse buffer |
| phStatus_t phhalHw_WriteEEPROM | ( | void * | pDataParams, |
| uint16_t | wOption, | ||
| uint32_t | dwStartAddr, | ||
| uint8_t * | pData, | ||
| uint16_t | wDataLen | ||
| ) |
Writes the EEPROM information.
| PH_ERR_SUCCESS | Command successfully executed. |
| PH_ERR_INTERFACE_ERROR | Communication error. |
| PH_ERR_PROTOCOL_ERROR | Invalid frame or unexpected receive data length or command code mismatch. |
| [in] | pDataParams | [IN] Pointer to this layer parameter structure. |
| [in] | wOption | [IN] Options to be used for EEPROM Writing.
|
| [in] | dwStartAddr | [IN] The EEPROM address information to be written. One of the following,
|
| [in] | pData | [IN] Information to be written to EERPOM. One of the following,
|
| [in] | wDataLen | [IN] Length of bytes available in pData buffer. |