NXP NFC Reader Library
v4.040.05.011646
|
Pn5180 Instruction functions. More...
![]() |
Functions | |
phStatus_t | phhalHw_Pn5180_Instr_Execute (phhalHw_Pn5180_DataParams_t *pDataParams, uint8_t bInstructionCode, uint8_t *pInstrPayload, uint16_t wInstrPayloadLength, uint16_t wExpectedResponseLength, uint8_t **ppInstrResponse) |
Execute a PN5180 Instruction. More... | |
phStatus_t | phhalHw_Pn5180_Instr_WriteRegister (phhalHw_Pn5180_DataParams_t *pDataParams, uint8_t bRegister, uint32_t dwValue) |
Write a 32 bit value (little endian) to a logical register. More... | |
phStatus_t | phhalHw_Pn5180_Instr_WriteRegisterOrMask (phhalHw_Pn5180_DataParams_t *pDataParams, uint8_t bRegister, uint32_t dwMask) |
Perform a logical OR operation on a register using provided mask. More... | |
phStatus_t | phhalHw_Pn5180_Instr_WriteRegisterAndMask (phhalHw_Pn5180_DataParams_t *pDataParams, uint8_t bRegister, uint32_t dwMask) |
Perform a logical AND operation on a register using provided mask. More... | |
phStatus_t | phhalHw_Pn5180_Instr_WriteRegisterMultiple (phhalHw_Pn5180_DataParams_t *pDataParams, uint8_t *pRegTypeValueSets, uint16_t wSizeOfRegTypeValueSets) |
Perform a write register operation using a set of Register-Value pairs. More... | |
phStatus_t | phhalHw_Pn5180_Instr_ReadRegister (phhalHw_Pn5180_DataParams_t *pDataParams, uint8_t bRegister, uint32_t *pValue) |
Read back content of a register. More... | |
phStatus_t | phhalHw_Pn5180_Instr_ReadRegisterMultiple (phhalHw_Pn5180_DataParams_t *pDataParams, uint8_t *pRegisters, uint8_t bNumOfRegisters, uint8_t **ppValues) |
Perform a read register operation on a set of registers. More... | |
phStatus_t | phhalHw_Pn5180_Instr_WriteE2Prom (phhalHw_Pn5180_DataParams_t *pDataParams, uint8_t bE2PromAddress, uint8_t *pDataToWrite, uint8_t bDataLength) |
Write values sequentially to E2PROM. More... | |
phStatus_t | phhalHw_Pn5180_Instr_ReadE2Prom (phhalHw_Pn5180_DataParams_t *pDataParams, uint8_t bE2PromAddress, uint8_t *pReadData, uint8_t bDataLength) |
Read values sequentially to E2PROM. More... | |
phStatus_t | phhalHw_Pn5180_Instr_WriteTxData (phhalHw_Pn5180_DataParams_t *pDataParams, uint8_t *pTxBuffer, uint16_t wTxBufferLength) |
Write Tx data to internal CLIF transmission buffer. More... | |
phStatus_t | phhalHw_Pn5180_Instr_SendData (phhalHw_Pn5180_DataParams_t *pDataParams, uint8_t *pTxBuffer, uint16_t wTxBufferLength, uint8_t bNumberOfValidBits) |
Write Tx data to internal RF transmission buffer and start transmission using transceive command. More... | |
phStatus_t | phhalHw_Pn5180_Instr_RetrieveRxData (phhalHw_Pn5180_DataParams_t *pDataParams, uint8_t **pRxBuffer, uint16_t wExpectedRxDataLength) |
Read data back from internal CLIF Rx buffer. More... | |
phStatus_t | phhalHw_Pn5180_Instr_SwitchModeStandby (phhalHw_Pn5180_DataParams_t *pDataParams, uint8_t bWakeupControlMask, uint16_t wWakeupCounterInMs) |
Switch to standby mode. More... | |
phStatus_t | phhalHw_Pn5180_Instr_SwitchModeLpcd (phhalHw_Pn5180_DataParams_t *pDataParams, uint16_t wWakeupCounterInMs) |
Switch to LPCD mode. More... | |
phStatus_t | phhalHw_Pn5180_Instr_SwitchModeAutocoll (phhalHw_Pn5180_DataParams_t *pDataParams, uint8_t bRfTechnologyMask, uint8_t bAutocollMode) |
Switch to Autocoll mode. More... | |
phStatus_t | phhalHw_Pn5180_Instr_MifareAuthenticate (phhalHw_Pn5180_DataParams_t *pDataParams, uint8_t *pKey, uint8_t bKeyType, uint8_t bBlockNo, uint8_t *pUid) |
Perform authentication on an activated Mifare Classic card. More... | |
phStatus_t | phhalHw_Pn5180_Instr_EpcGen2Inventory (phhalHw_Pn5180_DataParams_t *pDataParams, uint8_t *pSelectCommand, uint8_t bSelectCommandLength, uint8_t bSelectCommandBitsInLastByte, uint8_t *pBeginRoundCmmand, uint8_t bTimeslotProcessingBehavior) |
Perform an ISO 18000-3M3 Inventory. More... | |
phStatus_t | phhalHw_Pn5180_Instr_EpcGen2RetrieveResultSize (phhalHw_Pn5180_DataParams_t *pDataParams, uint16_t *pResultSize) |
Retrieve the size of a pending EPC GEN2 inventory result. More... | |
phStatus_t | phhalHw_Pn5180_Instr_EpcGen2RetrieveResult (phhalHw_Pn5180_DataParams_t *pDataParams, uint8_t **ppInventoryResult, uint16_t wResultSize) |
Return the result of inventory. More... | |
phStatus_t | phhalHw_Pn5180_Instr_EpcGen2ResumeInventory (phhalHw_Pn5180_DataParams_t *pDataParams) |
Resume an ISO 18000-3M3 Inventory. More... | |
phStatus_t | phhalHw_Pn5180_Instr_LoadRfConfiguration (phhalHw_Pn5180_DataParams_t *pDataParams, uint8_t bRfTxConfiguration, uint8_t bRfRxConfiguration) |
Load RF Tx and Rx settings from E2PROM. More... | |
phStatus_t | phhalHw_Pn5180_Instr_UpdateRfConfiguration (phhalHw_Pn5180_DataParams_t *pDataParams, uint8_t *pRfConfiguration, uint8_t bRfConfigurationSize) |
Update the RF configuration. More... | |
phStatus_t | phhalHw_Pn5180_Instr_RetrieveRfConfigurationSize (phhalHw_Pn5180_DataParams_t *pDataParams, uint8_t bRfConfiguration, uint8_t *pNumOfRegisters) |
Retrieve the number of register-value pairs of the RF configuration. More... | |
phStatus_t | phhalHw_Pn5180_Instr_RetrieveRfConfiguration (phhalHw_Pn5180_DataParams_t *pDataParams, uint8_t bRfConfiguration, uint8_t **ppRfConfiguration, uint8_t bNumOfRegisters) |
Retrieve the RF configuration. More... | |
phStatus_t | phhalHw_Pn5180_Instr_RfOn (phhalHw_Pn5180_DataParams_t *pDataParams, uint8_t bRfOnConfig) |
Turns the RF field ON. More... | |
phStatus_t | phhalHw_Pn5180_Instr_RfOff (phhalHw_Pn5180_DataParams_t *pDataParams) |
Turns the RF field OFF. More... | |
phStatus_t | phhalHw_Pn5180_Instr_ConfigureTestBusDigital (phhalHw_Pn5180_DataParams_t *pDataParams, uint8_t bTBSelect, uint8_t *pTBpos, uint8_t bTBposSize) |
Configures the Digital Test BUS. More... | |
phStatus_t | phhalHw_Pn5180_Instr_ConfigureTestBusAnalog (phhalHw_Pn5180_DataParams_t *pDataParams, uint8_t bDAC1Config, uint8_t bDAC0Config) |
Configures the Analog Test BUS. More... | |
phStatus_t | phhalHw_Pn5180_Instr_GetHALVersion (uint16_t *pValue) |
Returns the current version of HAL only for I&V reporting purposes. More... | |
phStatus_t | phhalHw_Pn5180_Int_LPCD_SetConfig (phhalHw_Pn5180_DataParams_t *pDataParams, uint16_t wConfig, uint16_t wValue) |
Set config for LFCD which is IC specific. More... | |
phStatus_t | phhalHw_Pn5180_Int_LPCD_GetConfig (phhalHw_Pn5180_DataParams_t *pDataParams, uint16_t wConfig, uint16_t *pValue) |
Get config for LFCD which is IC specific. More... | |
phStatus_t | phhalHw_Pn5180_Instr_SwitchModeNormal (phhalHw_Pn5180_DataParams_t *pDataParams) |
Switch to Normal mode. More... | |
Major Version | |
#define | HAL_MAJOR_VER ((uint16_t)(3)) |
Minor Version | |
#define | HAL_MINOR_VER ((uint16_t)(4)) |
PN5180 Instruction Codes. | |
To be used with phhalHw_Pn5180_Instr_Execute | |
#define | PHHAL_HW_PN5180_SET_INSTR_WRITE_REGISTER 0x00U |
Write 32 bit value to a register. More... | |
#define | PHHAL_HW_PN5180_SET_INSTR_WRITE_REGISTER_OR_MASK 0x01U |
Perform a logical OR operation on a register using provided mask. More... | |
#define | PHHAL_HW_PN5180_SET_INSTR_WRITE_REGISTER_AND_MASK 0x02U |
Perform a logical AND operation on a register using provided mask. More... | |
#define | PHHAL_HW_PN5180_SET_INSTR_WRITE_REGISTER_MULTIPLE 0x03U |
Perform a write register operation using a set of Register-Value pairs. More... | |
#define | PHHAL_HW_PN5180_GET_INSTR_READ_REGISTER 0x04U |
Read back content of a register. More... | |
#define | PHHAL_HW_PN5180_GET_INSTR_READ_REGISTER_MULTIPLE 0x05U |
Perform a read register operation on a set of registers. More... | |
#define | PHHAL_HW_PN5180_SET_INSTR_WRITE_E2PROM 0x06U |
Write given values sequentially to E2PROM. More... | |
#define | PHHAL_HW_PN5180_GET_INSTR_READ_E2PROM 0x07U |
Read out values from E2PROM sequentially. More... | |
#define | PHHAL_HW_PN5180_SET_INSTR_WRITE_TX_DATA 0x08U |
Write Tx data to internal CLIF transmission buffer. More... | |
#define | PHHAL_HW_PN5180_SET_INSTR_SEND_DATA 0x09U |
Write Tx data to internal RF transmission buffer and starts transmission using transceive command. More... | |
#define | PHHAL_HW_PN5180_GET_INSTR_RETRIEVE_RX_DATA 0x0AU |
Read Rx data from internal RF reception buffer. More... | |
#define | PHHAL_HW_PN5180_SET_INSTR_SWITCH_MODE 0x0BU |
Switch operation mode. More... | |
#define | PHHAL_HW_PN5180_GET_INSTR_MFC_AUTHENTICATE 0x0CU |
Perform authentication on an activated Mifare Classic card. More... | |
#define | PHHAL_HW_PN5180_SET_INSTR_EPC_GEN2_INVENTORY 0x0DU |
Perform an ISO 18000-3M3 Inventory. More... | |
#define | PHHAL_HW_PN5180_SET_INSTR_EPC_GEN2_RESUME_INVENTORY 0x0EU |
Resume ISO18000-3M3 Inventory. More... | |
#define | PHHAL_HW_PN5180_GET_INSTR_EPC_GEN2_RETRIEVE_INVENTORY_RESULT_SIZE 0x0FU |
Retrieve the size of a pending EPC GEN2 inventory result. More... | |
#define | PHHAL_HW_PN5180_GET_INSTR_EPC_GEN2_RETRIEVE_INVENTORY_RESULT 0x10U |
Return the result of inventory. More... | |
#define | PHHAL_HW_PN5180_SET_INSTR_LOAD_RF_CONFIGURATION 0x11U |
Load RF Tx and Rx settings from E2PROM. More... | |
#define | PHHAL_HW_PN5180_SET_INSTR_UPDATE_RF_CONFIGURATION 0x12U |
Update the RF configuration. More... | |
#define | PHHAL_HW_PN5180_GET_INSTR_RETRIEVE_RF_CONFIGURATION_SIZE 0x13U |
Retrieve the number of register-value pairs of the RF configuration. More... | |
#define | PHHAL_HW_PN5180_GET_INSTR_RETRIEVE_RF_CONFIGURATION 0x14U |
Retrieve the RF configuration. More... | |
#define | PHHAL_HW_PN5180_SET_INSTR_CONFIGURE_TESTBUS_RFU 0x15U |
Retrieve the RF configuration. More... | |
#define | PHHAL_HW_PN5180_GET_INSTR_FIELD_ON 0x16U |
RF Field ON. More... | |
#define | PHHAL_HW_PN5180_GET_INSTR_FIELD_OFF 0x17U |
RF field OFF. More... | |
#define | PHHAL_HW_PN5180_SET_INSTR_CONFIGURE_TESTBUS_DIGITAL 0x18U |
Digital Testbus. More... | |
#define | PHHAL_HW_PN5180_SET_INSTR_CONFIGURE_TESTBUS_ANALOG 0x19U |
Analog Testbus. | |
PN5180 Write multiple register operation type. | |
To be used with phhalHw_Pn5180_Instr_WriteRegisterMultiple. | |
#define | PHHAL_HW_PN5180_WRITE_MULTIPLE_TYPE_WRITE 0x01U |
Write register operation requested. More... | |
#define | PHHAL_HW_PN5180_WRITE_MULTIPLE_TYPE_WRITE_OR_MASK 0x02U |
Write register OR mask operation requested. More... | |
#define | PHHAL_HW_PN5180_WRITE_MULTIPLE_TYPE_WRITE_AND_MASK 0x03U |
Write register AND mask operation requested. More... | |
PN5180 wakeup control bitmask defintion | |
#define | PHHAL_HW_PN5180_WAKEUP_CONTROL_MASK_WUP_ON_COUNTER 0x01U |
Wake up from standby on wakeup counter expire. More... | |
#define | PHHAL_HW_PN5180_WAKEUP_CONTROL_MASK_WUP_ON_EXT_FIELD 0x02U |
Wake up from standby due to external RF field. More... | |
#define | PHHAL_HW_PN5180_WAKEUP_CONTROL_MASK_ASSERT_GPO 0x04U |
Assert GPO when leaving standby. More... | |
PN5180 autocoll RF technology bitmask definition | |
#define | PHHAL_HW_PN5180_AUTOCOLL_RF_TECHNOLOGY_MASK_NFC_A 0x01U |
Autocoll for NFC-A (ISO14443 mode A) enabled. More... | |
#define | PHHAL_HW_PN5180_AUTOCOLL_RF_TECHNOLOGY_MASK_NFC_F 0x02U |
Autocoll for NFC-F (FeliCa) enabled. More... | |
#define | PHHAL_HW_PN5180_AUTOCOLL_RF_TECHNOLOGY_MASK_ISO18092_ACTIVE 0x04U |
Autocoll for ISO18092 target mode active enabled. More... | |
#define | PHHAL_HW_PN5180_AUTOCOLL_RF_TECHNOLOGY_MASK_NFC_F_ACTIVE 0x08U |
Autocoll for NFC_F target mode active enabled. More... | |
PN5180 autocoll operation mode | |
#define | PHHAL_HW_PN5180_AUTOCOLL_MODE_TERMINATE_ON_RF_OFF 0x00U |
Autocoll terminates when external field vanishes. More... | |
#define | PHHAL_HW_PN5180_AUTOCOLL_MODE_AUTONOMOUS_WITH_STANDBY 0x01U |
Autocoll terminates only upon successful activation. More... | |
#define | PHHAL_HW_PN5180_AUTOCOLL_MODE_AUTONOMOUS_WITHOUT_STANDBY 0x02U |
Autocoll terminates only upon successful activation. More... | |
PN5180 Mifare authentication key type definition and length defines | |
#define | PHHAL_HW_PN5180_INSTR_MFC_AUTHENTICATE_KEY_TYPE_A 0x60U |
MIFARE Classic Key Type A. More... | |
#define | PHHAL_HW_PN5180_INSTR_MFC_AUTHENTICATE_KEY_TYPE_B 0x61U |
MIFARE Classic Key Type B. More... | |
#define | PHHAL_HW_PN5180_MFC_UID_LEN 0x04U |
MIFARE Classic Key Key Len. More... | |
PN5180 Timeslot processing behavior. | |
#define | PHHAL_HW_PN5180_EPC_GEN2_TIMESLOT_FILL_BUFFER 0x00U |
EPC GEN2 inventory processes timeslots until buffer is full. More... | |
#define | PHHAL_HW_PN5180_EPC_GEN2_TIMESLOT_SINGLE 0x01U |
EPC GEN2 inventory processes one timeslot only. More... | |
#define | PHHAL_HW_PN5180_EPC_GEN2_TIMESLOT_SINGLE_SELECT_TAG 0x02U |
EPC GEN2 inventory processes one timeslot only. More... | |
PN5180 Switch Mode Type type. | |
#define | PHHAL_HW_PN5180_SWITCH_MODE_STANDBY 0x00U |
PN5180 is in standby/sleep state to save power. More... | |
#define | PHHAL_HW_PN5180_SWITCH_MODE_LPCD 0x01U |
PN5180 is in low power card detection mode. More... | |
#define | PHHAL_HW_PN5180_SWITCH_MODE_AUTOCOLL 0x02U |
PN5180 is acting as RF listener, performing target mode activation autonomously. More... | |
#define | PHHAL_HW_PN5180_SWITCH_MODE_NORMAL 0x03U |
PN5180 is in Normal modes. More... | |
PN5180 register, EEPROM & TX/RX buffer custom definitions. | |
To be used with phhalHw_Pn5180_Instr_WriteRegister, phhalHw_Pn5180_Instr_WriteRegisterOrMask, phhalHw_Pn5180_Instr_WriteRegisterAndMask, phhalHw_Pn5180_Instr_WriteRegisterMultiple, phhalHw_Pn5180_Instr_ReadRegister, phhalHw_Pn5180_Instr_ReadRegisterMultiple, phhalHw_Pn5180_Instr_WriteE2Prom, phhalHw_Pn5180_Instr_ReadE2Prom, phhalHw_Pn5180_Instr_WriteTxData, phhalHw_Pn5180_Instr_SendData, phhalHw_Pn5180_Instr_RetrieveRxData. | |
#define | PHHAL_HW_PN5180_MAX_REGISTER_TYPE_VALUE_SET 0x102U |
Size of the buffer holding the register-type-value sets. More... | |
#define | PHHAL_HW_PN5180_MIN_REGISTER_TYPE_VALUE_SET 0x06U |
Size of the buffer holding the register-type-value sets. More... | |
#define | PHHAL_HW_PN5180_E2PROM_MAX_DATA_LENGTH 0x41U |
The E2PROM maximum payload length is 254 byte. More... | |
#define | PHHAL_HW_PN5180_E2PROM_MIN_DATA_LENGTH 0x01U |
The E2PROM minimum payload length is 1 byte. More... | |
#define | PHHAL_HW_PN5180_E2PROM_MAX_ADDESS 0xFDU |
The E2PROM maximum Address is 0x93. More... | |
#define | PHHAL_HW_PN5180_E2PROM_MIN_ADDESS 0x16U |
The E2PROM minimum Address 0. More... | |
#define | PHHAL_HW_PN5180_TX_DATA_MAX_LENGTH 0x104U |
The Transmission maximum payload length is 260 byte. More... | |
#define | PHHAL_HW_PN5180_TX_DATA_MIN_LENGTH 0x01U |
The Transmission minimum payload length is 1 byte. More... | |
#define | PHHAL_HW_PN5180_RX_DATA_MAX_LENGTH 0x200U |
The Retrieved Maximum data length is 512 byte. More... | |
#define | PHHAL_HW_PN5180_RX_DATA_MIN_LENGTH 0x01U |
The Retrieved Minimum data length is 1 byte. More... | |
#define | PHHAL_HW_PN5180_INSTR_DATA_MIN_VALUE 0x01U |
The Minimum data value 01. More... | |
#define | PHHAL_HW_PN5180_INVALID_REG_START_ADDRESS 0x43U |
Regs from 0x42 to 0x7F are not implemented Update everytime regmap changes due to reg addition. More... | |
#define | PHHAL_HW_PN5180_INVALID_REG_END_ADDRESS 0x7FU |
Regs from 0x29 to 0x7F are not implemented Update everytime regmap changes due to reg addition. More... | |
#define | PHHAL_HW_PN5180_MAX_REGISTERS_READ_MULTIPLE 18U |
Maximum registers for multiple Read. | |
#define | PHHAL_HW_PN5180_BYTES_PER_REGISTER 4U |
#define | PHHAL_HW_PN5180_SEND_DATA_FIXED_CMD_BYTES 2U |
#define | PHHAL_HW_PN5180_WRITE_TX_DATA_FIXED_CMD_BYTES 1U |
PN5180 Execute instruction custom definitions. | |
To be used with phhalHw_Pn5180_Instr_Execute. | |
#define | PHHAL_HW_PN5180_MAX_INSTRUCTION_CODE PHHAL_HW_PN5180_GET_INSTR_RETRIEVE_RF_CONFIGURATION |
Maximum value of the instruction code. More... | |
#define | PHHAL_HW_PN5180_MIN_PAYLOAD_LENGTH 1U |
Minimum payload length for the instruction. More... | |
#define | PHHAL_HW_PN5180_MAX_PAYLOAD_LENGTH 261U |
Maximum payload length for the instruction. More... | |
#define | PHHAL_HW_PN5180_MAX_INSTRUCTION_LENGTH (1U + PHHAL_HW_PN5180_MAX_PAYLOAD_LENGTH) |
Maximum length for the instruction. More... | |
#define | PHHAL_HW_PN5180_MAX_INST_RESPONSE_LENGTH (0x200U) |
Maximum length for the instruction response. | |
PN5180 standby custom definitions. | |
To be used with phhalHw_Pn5180_Instr_SwitchModeStandby. | |
#define | PHHAL_HW_PN5180_WAKEUP_CONTROL_MASK |
Mask value for wakeup control. More... | |
#define | PHHAL_HW_PN5180_MAX_WAKEUP_COUNTER (2690) |
Maximum value for wakeup counter in msecs. More... | |
PN5180 Autocoll custom definitions. | |
To be used with phhalHw_Pn5180_Instr_SwitchModeAutocoll. | |
#define | PHHAL_HW_PN5180_MAX_AUTOCOLL_MODE PHHAL_HW_PN5180_WAKEUP_CONTROL_MASK_ASSERT_GPO |
Maximum value for Autocoll mode. More... | |
#define | PHHAL_HW_PN5180_AUTOCOLL_MODE_MASK |
Mask value for RF technology. More... | |
#define | PHHAL_HW_PN5180_MAX_AUTOCOLL_RF_TECHNOLOGY PHHAL_HW_PN5180_AUTOCOLL_RF_TECHNOLOGY_MASK_ISO18092_ACTIVE |
Maximum value for RF technology. More... | |
#define | PHHAL_HW_PN5180_AUTOCOLL_RF_TECHNOLOGY_MASK |
Mask value for RF technology. More... | |
PN5180 EPC GEN2 custom definitions. | |
To be used with phhalHw_Pn5180_Instr_EpcGen2Inventory, phhalHw_Pn5180_Instr_EpcGen2RetrieveResultSize, phhalHw_Pn5180_Instr_EpcGen2RetrieveResult, phhalHw_Pn5180_Instr_EpcGen2ResumeInventory. | |
#define | PHHAL_HW_PN5180_MIN_SELECT_COMMAND_LENGTH 1U |
Minimum length of Select command. More... | |
#define | PHHAL_HW_PN5180_MAX_SELECT_COMMAND_LENGTH 39U |
Maximum length of Select command. More... | |
#define | PHHAL_HW_PN5180_BEGIN_COMMAND_LENGTH 03U |
length of Begin command. More... | |
#define | PHHAL_HW_PN5180_MAX_NUM_OF_BITS_FOR_LAST_BYTE 7U |
Maximum number of bits to be transmitted in the last byte of pSelectCommand . More... | |
#define | PHHAL_HW_PN5180_MAX_EPC_GEN2_TIMESLOT (PHHAL_HW_PN5180_EPC_GEN2_TIMESLOT_SINGLE_SELECT_TAG) |
Maximum EPC GEN2 TIMESLOT parameter. More... | |
PN5180 RF configuration custom definitions. | |
To be used with phhalHw_Pn5180_Instr_LoadRfConfiguration, phhalHw_Pn5180_Instr_UpdateRfConfiguration, phhalHw_Pn5180_Instr_RetrieveRfConfigurationSize, phhalHw_Pn5180_Instr_RetrieveRfConfiguration. | |
#define | PHHAL_HW_PN5180_MIN_RF_TX_CONFIGURATION_INDEX 0x00 |
Minimum RF configuration index for TX. More... | |
#define | PHHAL_HW_PN5180_MAX_RF_TX_CONFIGURATION_INDEX 0x1C |
Maximum RF configuration index for TX. More... | |
#define | PHHAL_HW_PN5180_MIN_RF_RX_CONFIGURATION_INDEX 0x80 |
Minimum RF configuration index for RX. More... | |
#define | PHHAL_HW_PN5180_MAX_RF_RX_CONFIGURATION_INDEX 0x9D |
Maximum RF configuration index for RX. More... | |
#define | PHHAL_HW_PN5180_MAX_RF_CONFIGURATION_INDEX PHHAL_HW_PN5180_MAX_RF_RX_CONFIGURATION_INDEX |
Maximum RF configuration index. More... | |
#define | PHHAL_HW_PN5180_CURRENT_RF_CONFIGURATION_INDEX 0xFF |
Current RF configuration index for TX/RX. More... | |
#define | PHHAL_HW_PN5180_RF_CONFIGURATION_SIZE 6U |
Size of a single RF configuration 1 Byte Rx or Tx configuration index 1 Byte Register address within the RF configuration 4 Bytes value to be written into the register. More... | |
#define | PHHAL_HW_PN5180_RETRIEVE_RF_EACH_CONFIGURATION 5U |
Size of a single RF configuration 1 Byte Register address within the RF configuration 4 Bytes value of the register. More... | |
#define | PHHAL_HW_PN5180_RETRIEVE_RF_CONFIGURATION_SIZE_RESPONSE 1U |
#define | PHHAL_HW_PN5180_MAX_RF_CONFIGURATION_SIZE 252U |
Maximum size of the RF configurations. More... | |
#define | PHHAL_HW_PN5180_MAX_RF_REGS 0x43 |
Max RF config regs- Not in Spec-Discussed with JP. More... | |
#define | PHHAL_HW_PN5180_UPDATE_RF_CONFIG_FIXED_CMD_BYTES 2U |
PN5180 Load Configuration for Tx and Rx baudrates/reg values. | |
#define | PHHAL_HW_PN5180_RF_TX_ISO14443A_106_MILLER 0U |
Type A baud rate @ 106 load configurations TX Value. More... | |
#define | PHHAL_HW_PN5180_RF_TX_ISO14443A_212_MILLER 1U |
Type A baud rate @ 212 load configurations TX Value. More... | |
#define | PHHAL_HW_PN5180_RF_TX_ISO14443A_424_MILLER 2U |
Type A baud rate @ 424 load configurations TX Value. More... | |
#define | PHHAL_HW_PN5180_RF_TX_ISO14443A_848_MILLER 3U |
Type A baud rate @ 848 load configurations TX Value. More... | |
#define | PHHAL_HW_PN5180_RF_TX_ISO14443B_106_NRZ 4U |
Type B baud rate @ 106 load configurations TX Value. More... | |
#define | PHHAL_HW_PN5180_RF_TX_ISO14443B_212_NRZ 5U |
Type B baud rate @ 212 load configurations TX Value. More... | |
#define | PHHAL_HW_PN5180_RF_TX_ISO14443B_424_NRZ 6U |
Type B baud rate @ 424 load configurations TX Value. More... | |
#define | PHHAL_HW_PN5180_RF_TX_ISO14443B_848_NRZ 7U |
Type B baud rate @ 848 load configurations TX Value. More... | |
#define | PHHAL_HW_PN5180_RF_TX_FELICA_212 8U |
Type F baud rate @ 212 load configurations TX Value. More... | |
#define | PHHAL_HW_PN5180_RF_TX_FELICA_424 9U |
Type F baud rate @ 484 load configurations TX Value. More... | |
#define | PHHAL_HW_PN5180_RF_TX_NFC_AI_106_106 0x0AU |
Active Initiator baud rate @ 106 load configurations TX Value. More... | |
#define | PHHAL_HW_PN5180_RF_TX_NFC_AI_212_212 0x0BU |
Active Initiator baud rate @ 212 load configurations TX Value. More... | |
#define | PHHAL_HW_PN5180_RF_TX_NFC_AI_424_424 0x0CU |
Active Initiator baud rate @ 424 load configurations TX Value. More... | |
#define | PHHAL_HW_PN5180_RF_TX_ISO15693_26_1OF4_ASK100 0x0DU |
Type V (ISO 15693 ) load configurations TX Value. More... | |
#define | PHHAL_HW_PN5180_RF_TX_ISO15693_26_1OF4_ASK10 0x0EU |
Type V (ISO 15693 ) load configurations TX Value. More... | |
#define | PHHAL_HW_PN5180_RF_TX_ISO180003M3_TARI_18_88_ASK 0x0FU |
ISO 18000P3M3 load configurations TX Value. More... | |
#define | PHHAL_HW_PN5180_RF_TX_ISO180003M3_TARI_9_44_ASK 0x10U |
ISO 18000P3M3 load configurations TX Value. More... | |
#define | PHHAL_HW_PN5180_RF_TX_ISO14443A_PICC_106_MANCH_SUBC 0x13U |
Type A Card mode baud rate @ 106 load configurations TX Value. More... | |
#define | PHHAL_HW_PN5180_RF_TX_ISO14443A_PICC_212_BPSK 0x14U |
Type A Card mode baud rate @ 212 load configurations TX Value. More... | |
#define | PHHAL_HW_PN5180_RF_TX_ISO14443A_PICC_424_BPSK 0x15U |
Type A Card mode baud rate @ 424 load configurations TX Value. More... | |
#define | PHHAL_HW_PN5180_RF_TX_ISO14443A_PICC_848_BPSK 0x16U |
Type A Card mode baud rate @ 848 load configurations TX Value. More... | |
#define | PHHAL_HW_PN5180_RF_TX_NFC_PT_212 0x17U |
Passive Target baud rate @ 212 load configurations TX Value. More... | |
#define | PHHAL_HW_PN5180_RF_TX_NFC_PT_424 0x18U |
Passive Target baud rate @ 424 load configurations TX Value. More... | |
#define | PHHAL_HW_PN5180_RF_TX_NFC_AT_106 0x19U |
Active Target baud rate @ 106 load configurations TX Value. More... | |
#define | PHHAL_HW_PN5180_RF_TX_NFC_AT_212 0x1AU |
Active Target baud rate @ 212 load configurations TX Value. More... | |
#define | PHHAL_HW_PN5180_RF_TX_NFC_AT_424 0x1BU |
Active Target baud rate @ 424 load configurations TX Value. More... | |
#define | PHHAL_HW_PN5180_RF_TX_GTM_All_Al 0x1CU |
General Target Mode configuration. More... | |
#define | PHHAL_HW_PN5180_RF_RX_ISO14443A_106_MANCH_SUBC 0x80U |
Type A baud rate @ 106 load configurations RX Value. More... | |
#define | PHHAL_HW_PN5180_RF_RX_ISO14443A_212_BPSK 0x81U |
Type A baud rate @ 212 load configurations RX Value. More... | |
#define | PHHAL_HW_PN5180_RF_RX_ISO14443A_424_BPSK 0x82U |
Type A baud rate @ 424 load configurations RX Value. More... | |
#define | PHHAL_HW_PN5180_RF_RX_ISO14443A_848_BPSK 0x83U |
Type A baud rate @ 848 load configurations RX Value. More... | |
#define | PHHAL_HW_PN5180_RF_RX_ISO14443B_106_BPSK 0x84U |
Type B baud rate @ 106 load configurations RX Value. More... | |
#define | PHHAL_HW_PN5180_RF_RX_ISO14443B_212_BPSK 0x85U |
Type B baud rate @ 212 load configurations RX Value. More... | |
#define | PHHAL_HW_PN5180_RF_RX_ISO14443B_424_BPSK 0x86U |
Type B baud rate @ 424 load configurations RX Value. More... | |
#define | PHHAL_HW_PN5180_RF_RX_ISO14443B_848_BPSK 0x87U |
Type B baud rate @ 848 load configurations RX Value. More... | |
#define | PHHAL_HW_PN5180_RF_RX_FELICA_212 0x88U |
Type F baud rate @ 212 load configurations RX Value. More... | |
#define | PHHAL_HW_PN5180_RF_RX_FELICA_424 0x89U |
Type F baud rate @ 424 load configurations RX Value. More... | |
#define | PHHAL_HW_PN5180_RF_RX_NFC_AI_106 0x8AU |
Active Initiator @ baud rate 106 load configurations RX Value. More... | |
#define | PHHAL_HW_PN5180_RF_RX_NFC_AI_212 0x8BU |
Active Initiator @ baud rate 212 load configurations RX Value. More... | |
#define | PHHAL_HW_PN5180_RF_RX_NFC_AI_424 0x8CU |
Active Initiator @ baud rate 424 load configurations RX Value. More... | |
#define | PHHAL_HW_PN5180_RF_RX_ISO15693_26_1OF4_SC 0x8DU |
Type V (ISO 15693 ) load configurations RX Value. More... | |
#define | PHHAL_HW_PN5180_RF_RX_ISO15693_53_1OF4_SC 0x8EU |
Type V (ISO 15693 ) load configurations RX Value. More... | |
#define | PHHAL_HW_PN5180_RF_RX_ISO180003M3_MANCH424_4_PERIOD 0x8FU |
ISO 18000P3M3 load configurations RX Value. More... | |
#define | PHHAL_HW_PN5180_RF_RX_ISO180003M3_MANCH424_2_PERIOD 0x90U |
ISO 18000P3M3 load configurations RX Value. More... | |
#define | PHHAL_HW_PN5180_RF_RX_ISO180003M3_MANCH848_4_PERIOD 0x91U |
ISO 18000P3M3 load configurations RX Value. More... | |
#define | PHHAL_HW_PN5180_RF_RX_ISO180003M3_MANCH848_2_PERIOD 0x92U |
ISO 18000P3M3 load configurations RX Value. More... | |
#define | PHHAL_HW_PN5180_RF_RX_ISO14443A_PICC_106_MILLER 0x93U |
Type A Card mode baud rate @ 106 load configurations RX Value. More... | |
#define | PHHAL_HW_PN5180_RF_RX_ISO14443A_PICC_212_MILLER 0x94U |
Type A Card mode baud rate @ 212 load configurations RX Value. More... | |
#define | PHHAL_HW_PN5180_RF_RX_ISO14443A_PICC_424_MILLER 0x95U |
Type A Card mode baud rate @ 424 load configurations RX Value. More... | |
#define | PHHAL_HW_PN5180_RF_RX_ISO14443A_PICC_848_MILLER 0x96U |
Type A Card mode baud rate @ 848 load configurations RX Value. More... | |
#define | PHHAL_HW_PN5180_RF_RX_NFC_PT_212 0x97U |
Passive Target baud rate @ 212 load configurations RX Value. More... | |
#define | PHHAL_HW_PN5180_RF_RX_NFC_PT_424 0x98U |
Passive Target baud rate @ 424 load configurations RX Value. More... | |
#define | PHHAL_HW_PN5180_RF_RX_NFC_AT_106 0x99U |
Active Initiator baud rate @ 106 load configurations RX Value. More... | |
#define | PHHAL_HW_PN5180_RF_RX_NFC_AT_212 0x9AU |
Active Initiator baud rate @ 212 load configurations RX Value. More... | |
#define | PHHAL_HW_PN5180_RF_RX_NFC_AT_424 0x9BU |
Active Initiator baud rate @ 424 load configurations RX Value. More... | |
#define | PHHAL_HW_PN5180_RF_RX_GTM_All_All 0x9CU |
General Target Mode configuration. More... | |
PN5180 EEPROM custom definitions. | |
To be used with phhalHw_Pn5180_Instr_WriteE2Prom. | |
#define | PHHAL_HW_PN5180_WRITE_E2PROM_FIXED_CMD_BYTES 3U |
PN5180 ConfigureTestBus custom definitions. | |
To be used with phhalHw_Pn5180_Instr_ConfigureTestBusDigital. | |
#define | PHHAL_HW_PN5180_CONFIGURE_TESTBUS_DIGITAL_FIXED_CMD_BYTES 2U |
#define | PHHAL_HW_PN5180_CONFIGURE_TESTBUS_ANALOG_CMD_BYTES 3U |
LPCD configuration | |
#define | PHHAL_HW_CONFIG_SET_LPCD_WAKEUPTIME_MS 0x0070U |
Used value for wakeup counter in msecs, i.e. More... | |
#define | PHHAL_HW_CONFIG_LPCD_MODE 0x0071U |
Used to set options PHHAL_HW_PN5180_LPCD_MODE_DEFAULT or PHHAL_HW_PN5180_LPCD_MODE_POWERDOWN. | |
#define | PHHAL_HW_CONFIG_LPCD_REF 0x0072U |
Used to set or get LPCD Ref. | |
LPCD modes | |
#define | PHHAL_HW_PN5180_LPCD_MODE_DEFAULT 0x00U |
Default mode. More... | |
#define | PHHAL_HW_PN5180_LPCD_MODE_POWERDOWN 0x01U |
Powers down the IC for a certain amount of time and performs LPC after wakeup. More... | |
Pn5180 Instruction functions.
#define PHHAL_HW_PN5180_SET_INSTR_WRITE_REGISTER 0x00U |
Write 32 bit value to a register.
#define PHHAL_HW_PN5180_SET_INSTR_WRITE_REGISTER_OR_MASK 0x01U |
Perform a logical OR operation on a register using provided mask.
#define PHHAL_HW_PN5180_SET_INSTR_WRITE_REGISTER_AND_MASK 0x02U |
Perform a logical AND operation on a register using provided mask.
#define PHHAL_HW_PN5180_SET_INSTR_WRITE_REGISTER_MULTIPLE 0x03U |
Perform a write register operation using a set of Register-Value pairs.
#define PHHAL_HW_PN5180_GET_INSTR_READ_REGISTER 0x04U |
Read back content of a register.
#define PHHAL_HW_PN5180_GET_INSTR_READ_REGISTER_MULTIPLE 0x05U |
Perform a read register operation on a set of registers.
#define PHHAL_HW_PN5180_SET_INSTR_WRITE_E2PROM 0x06U |
Write given values sequentially to E2PROM.
#define PHHAL_HW_PN5180_GET_INSTR_READ_E2PROM 0x07U |
Read out values from E2PROM sequentially.
#define PHHAL_HW_PN5180_SET_INSTR_WRITE_TX_DATA 0x08U |
Write Tx data to internal CLIF transmission buffer.
#define PHHAL_HW_PN5180_SET_INSTR_SEND_DATA 0x09U |
Write Tx data to internal RF transmission buffer and starts transmission using transceive command.
#define PHHAL_HW_PN5180_GET_INSTR_RETRIEVE_RX_DATA 0x0AU |
Read Rx data from internal RF reception buffer.
#define PHHAL_HW_PN5180_SET_INSTR_SWITCH_MODE 0x0BU |
Switch operation mode.
Possible modes are: Normal, LPCD, Autocoll, Standby.
#define PHHAL_HW_PN5180_GET_INSTR_MFC_AUTHENTICATE 0x0CU |
Perform authentication on an activated Mifare Classic card.
#define PHHAL_HW_PN5180_SET_INSTR_EPC_GEN2_INVENTORY 0x0DU |
Perform an ISO 18000-3M3 Inventory.
#define PHHAL_HW_PN5180_SET_INSTR_EPC_GEN2_RESUME_INVENTORY 0x0EU |
Resume ISO18000-3M3 Inventory.
#define PHHAL_HW_PN5180_GET_INSTR_EPC_GEN2_RETRIEVE_INVENTORY_RESULT_SIZE 0x0FU |
Retrieve the size of a pending EPC GEN2 inventory result.
#define PHHAL_HW_PN5180_GET_INSTR_EPC_GEN2_RETRIEVE_INVENTORY_RESULT 0x10U |
Return the result of inventory.
#define PHHAL_HW_PN5180_SET_INSTR_LOAD_RF_CONFIGURATION 0x11U |
Load RF Tx and Rx settings from E2PROM.
#define PHHAL_HW_PN5180_SET_INSTR_UPDATE_RF_CONFIGURATION 0x12U |
Update the RF configuration.
#define PHHAL_HW_PN5180_GET_INSTR_RETRIEVE_RF_CONFIGURATION_SIZE 0x13U |
Retrieve the number of register-value pairs of the RF configuration.
#define PHHAL_HW_PN5180_GET_INSTR_RETRIEVE_RF_CONFIGURATION 0x14U |
Retrieve the RF configuration.
#define PHHAL_HW_PN5180_SET_INSTR_CONFIGURE_TESTBUS_RFU 0x15U |
Retrieve the RF configuration.
#define PHHAL_HW_PN5180_GET_INSTR_FIELD_ON 0x16U |
RF Field ON.
#define PHHAL_HW_PN5180_GET_INSTR_FIELD_OFF 0x17U |
RF field OFF.
#define PHHAL_HW_PN5180_SET_INSTR_CONFIGURE_TESTBUS_DIGITAL 0x18U |
Digital Testbus.
#define PHHAL_HW_PN5180_WRITE_MULTIPLE_TYPE_WRITE 0x01U |
Write register operation requested.
#define PHHAL_HW_PN5180_WRITE_MULTIPLE_TYPE_WRITE_OR_MASK 0x02U |
Write register OR mask operation requested.
#define PHHAL_HW_PN5180_WRITE_MULTIPLE_TYPE_WRITE_AND_MASK 0x03U |
Write register AND mask operation requested.
#define PHHAL_HW_PN5180_WAKEUP_CONTROL_MASK_WUP_ON_COUNTER 0x01U |
Wake up from standby on wakeup counter expire.
#define PHHAL_HW_PN5180_WAKEUP_CONTROL_MASK_WUP_ON_EXT_FIELD 0x02U |
Wake up from standby due to external RF field.
#define PHHAL_HW_PN5180_WAKEUP_CONTROL_MASK_ASSERT_GPO 0x04U |
Assert GPO when leaving standby.
#define PHHAL_HW_PN5180_AUTOCOLL_RF_TECHNOLOGY_MASK_NFC_A 0x01U |
Autocoll for NFC-A (ISO14443 mode A) enabled.
#define PHHAL_HW_PN5180_AUTOCOLL_RF_TECHNOLOGY_MASK_NFC_F 0x02U |
Autocoll for NFC-F (FeliCa) enabled.
#define PHHAL_HW_PN5180_AUTOCOLL_RF_TECHNOLOGY_MASK_ISO18092_ACTIVE 0x04U |
Autocoll for ISO18092 target mode active enabled.
#define PHHAL_HW_PN5180_AUTOCOLL_RF_TECHNOLOGY_MASK_NFC_F_ACTIVE 0x08U |
Autocoll for NFC_F target mode active enabled.
#define PHHAL_HW_PN5180_AUTOCOLL_MODE_TERMINATE_ON_RF_OFF 0x00U |
Autocoll terminates when external field vanishes.
#define PHHAL_HW_PN5180_AUTOCOLL_MODE_AUTONOMOUS_WITH_STANDBY 0x01U |
Autocoll terminates only upon successful activation.
When external field vanishes, PN5180 enters standby. PN5180 wakes up again once external field is detected again.
#define PHHAL_HW_PN5180_AUTOCOLL_MODE_AUTONOMOUS_WITHOUT_STANDBY 0x02U |
Autocoll terminates only upon successful activation.
PN5180 does use standby mode.
#define PHHAL_HW_PN5180_INSTR_MFC_AUTHENTICATE_KEY_TYPE_A 0x60U |
MIFARE Classic Key Type A.
#define PHHAL_HW_PN5180_INSTR_MFC_AUTHENTICATE_KEY_TYPE_B 0x61U |
MIFARE Classic Key Type B.
#define PHHAL_HW_PN5180_MFC_UID_LEN 0x04U |
MIFARE Classic Key Key Len.
#define PHHAL_HW_PN5180_EPC_GEN2_TIMESLOT_FILL_BUFFER 0x00U |
EPC GEN2 inventory processes timeslots until buffer is full.
#define PHHAL_HW_PN5180_EPC_GEN2_TIMESLOT_SINGLE 0x01U |
EPC GEN2 inventory processes one timeslot only.
#define PHHAL_HW_PN5180_EPC_GEN2_TIMESLOT_SINGLE_SELECT_TAG 0x02U |
EPC GEN2 inventory processes one timeslot only.
If timeslot contains a valid tag response, the tag is also selected.
#define PHHAL_HW_PN5180_SWITCH_MODE_STANDBY 0x00U |
PN5180 is in standby/sleep state to save power.
#define PHHAL_HW_PN5180_SWITCH_MODE_LPCD 0x01U |
PN5180 is in low power card detection mode.
#define PHHAL_HW_PN5180_SWITCH_MODE_AUTOCOLL 0x02U |
PN5180 is acting as RF listener, performing target mode activation autonomously.
#define PHHAL_HW_PN5180_SWITCH_MODE_NORMAL 0x03U |
PN5180 is in Normal modes.
#define PHHAL_HW_PN5180_MAX_REGISTER_TYPE_VALUE_SET 0x102U |
Size of the buffer holding the register-type-value sets.
Maximum size supported is 258 = 43 sets.
#define PHHAL_HW_PN5180_MIN_REGISTER_TYPE_VALUE_SET 0x06U |
Size of the buffer holding the register-type-value sets.
Minimum size supported is 6 = 1 set.
#define PHHAL_HW_PN5180_E2PROM_MAX_DATA_LENGTH 0x41U |
The E2PROM maximum payload length is 254 byte.
#define PHHAL_HW_PN5180_E2PROM_MIN_DATA_LENGTH 0x01U |
The E2PROM minimum payload length is 1 byte.
#define PHHAL_HW_PN5180_E2PROM_MAX_ADDESS 0xFDU |
The E2PROM maximum Address is 0x93.
#define PHHAL_HW_PN5180_E2PROM_MIN_ADDESS 0x16U |
The E2PROM minimum Address 0.
#define PHHAL_HW_PN5180_TX_DATA_MAX_LENGTH 0x104U |
The Transmission maximum payload length is 260 byte.
#define PHHAL_HW_PN5180_TX_DATA_MIN_LENGTH 0x01U |
The Transmission minimum payload length is 1 byte.
#define PHHAL_HW_PN5180_RX_DATA_MAX_LENGTH 0x200U |
The Retrieved Maximum data length is 512 byte.
#define PHHAL_HW_PN5180_RX_DATA_MIN_LENGTH 0x01U |
The Retrieved Minimum data length is 1 byte.
#define PHHAL_HW_PN5180_INSTR_DATA_MIN_VALUE 0x01U |
The Minimum data value 01.
#define PHHAL_HW_PN5180_INVALID_REG_START_ADDRESS 0x43U |
Regs from 0x42 to 0x7F are not implemented Update everytime regmap changes due to reg addition.
#define PHHAL_HW_PN5180_INVALID_REG_END_ADDRESS 0x7FU |
Regs from 0x29 to 0x7F are not implemented Update everytime regmap changes due to reg addition.
#define PHHAL_HW_PN5180_MAX_INSTRUCTION_CODE PHHAL_HW_PN5180_GET_INSTR_RETRIEVE_RF_CONFIGURATION |
Maximum value of the instruction code.
#define PHHAL_HW_PN5180_MIN_PAYLOAD_LENGTH 1U |
Minimum payload length for the instruction.
#define PHHAL_HW_PN5180_MAX_PAYLOAD_LENGTH 261U |
Maximum payload length for the instruction.
#define PHHAL_HW_PN5180_MAX_INSTRUCTION_LENGTH (1U + PHHAL_HW_PN5180_MAX_PAYLOAD_LENGTH) |
Maximum length for the instruction.
1 byte is for the instruction code
#define PHHAL_HW_PN5180_WAKEUP_CONTROL_MASK |
Mask value for wakeup control.
#define PHHAL_HW_PN5180_MAX_WAKEUP_COUNTER (2690) |
Maximum value for wakeup counter in msecs.
#define PHHAL_HW_PN5180_MAX_AUTOCOLL_MODE PHHAL_HW_PN5180_WAKEUP_CONTROL_MASK_ASSERT_GPO |
Maximum value for Autocoll mode.
#define PHHAL_HW_PN5180_AUTOCOLL_MODE_MASK |
Mask value for RF technology.
#define PHHAL_HW_PN5180_MAX_AUTOCOLL_RF_TECHNOLOGY PHHAL_HW_PN5180_AUTOCOLL_RF_TECHNOLOGY_MASK_ISO18092_ACTIVE |
Maximum value for RF technology.
#define PHHAL_HW_PN5180_AUTOCOLL_RF_TECHNOLOGY_MASK |
Mask value for RF technology.
#define PHHAL_HW_PN5180_MIN_SELECT_COMMAND_LENGTH 1U |
Minimum length of Select command.
#define PHHAL_HW_PN5180_MAX_SELECT_COMMAND_LENGTH 39U |
Maximum length of Select command.
#define PHHAL_HW_PN5180_BEGIN_COMMAND_LENGTH 03U |
length of Begin command.
#define PHHAL_HW_PN5180_MAX_NUM_OF_BITS_FOR_LAST_BYTE 7U |
Maximum number of bits to be transmitted in the last byte of pSelectCommand
.
0 in case all bits shall be transmitted, otherwise 1-7.
#define PHHAL_HW_PN5180_MAX_EPC_GEN2_TIMESLOT (PHHAL_HW_PN5180_EPC_GEN2_TIMESLOT_SINGLE_SELECT_TAG) |
Maximum EPC GEN2 TIMESLOT parameter.
#define PHHAL_HW_PN5180_MIN_RF_TX_CONFIGURATION_INDEX 0x00 |
Minimum RF configuration index for TX.
#define PHHAL_HW_PN5180_MAX_RF_TX_CONFIGURATION_INDEX 0x1C |
Maximum RF configuration index for TX.
#define PHHAL_HW_PN5180_MIN_RF_RX_CONFIGURATION_INDEX 0x80 |
Minimum RF configuration index for RX.
#define PHHAL_HW_PN5180_MAX_RF_RX_CONFIGURATION_INDEX 0x9D |
Maximum RF configuration index for RX.
#define PHHAL_HW_PN5180_MAX_RF_CONFIGURATION_INDEX PHHAL_HW_PN5180_MAX_RF_RX_CONFIGURATION_INDEX |
Maximum RF configuration index.
#define PHHAL_HW_PN5180_CURRENT_RF_CONFIGURATION_INDEX 0xFF |
Current RF configuration index for TX/RX.
#define PHHAL_HW_PN5180_RF_CONFIGURATION_SIZE 6U |
Size of a single RF configuration 1 Byte Rx or Tx configuration index 1 Byte Register address within the RF configuration 4 Bytes value to be written into the register.
#define PHHAL_HW_PN5180_RETRIEVE_RF_EACH_CONFIGURATION 5U |
Size of a single RF configuration 1 Byte Register address within the RF configuration 4 Bytes value of the register.
#define PHHAL_HW_PN5180_MAX_RF_CONFIGURATION_SIZE 252U |
Maximum size of the RF configurations.
It must be a multiple of PHHAL_HW_PN5180_RF_CONFIGURATION_SIZE.
#define PHHAL_HW_PN5180_MAX_RF_REGS 0x43 |
Max RF config regs- Not in Spec-Discussed with JP.
#define PHHAL_HW_PN5180_RF_TX_ISO14443A_106_MILLER 0U |
Type A baud rate @ 106 load configurations TX Value.
#define PHHAL_HW_PN5180_RF_TX_ISO14443A_212_MILLER 1U |
Type A baud rate @ 212 load configurations TX Value.
#define PHHAL_HW_PN5180_RF_TX_ISO14443A_424_MILLER 2U |
Type A baud rate @ 424 load configurations TX Value.
#define PHHAL_HW_PN5180_RF_TX_ISO14443A_848_MILLER 3U |
Type A baud rate @ 848 load configurations TX Value.
#define PHHAL_HW_PN5180_RF_TX_ISO14443B_106_NRZ 4U |
Type B baud rate @ 106 load configurations TX Value.
#define PHHAL_HW_PN5180_RF_TX_ISO14443B_212_NRZ 5U |
Type B baud rate @ 212 load configurations TX Value.
#define PHHAL_HW_PN5180_RF_TX_ISO14443B_424_NRZ 6U |
Type B baud rate @ 424 load configurations TX Value.
#define PHHAL_HW_PN5180_RF_TX_ISO14443B_848_NRZ 7U |
Type B baud rate @ 848 load configurations TX Value.
#define PHHAL_HW_PN5180_RF_TX_FELICA_212 8U |
Type F baud rate @ 212 load configurations TX Value.
#define PHHAL_HW_PN5180_RF_TX_FELICA_424 9U |
Type F baud rate @ 484 load configurations TX Value.
#define PHHAL_HW_PN5180_RF_TX_NFC_AI_106_106 0x0AU |
Active Initiator baud rate @ 106 load configurations TX Value.
#define PHHAL_HW_PN5180_RF_TX_NFC_AI_212_212 0x0BU |
Active Initiator baud rate @ 212 load configurations TX Value.
#define PHHAL_HW_PN5180_RF_TX_NFC_AI_424_424 0x0CU |
Active Initiator baud rate @ 424 load configurations TX Value.
#define PHHAL_HW_PN5180_RF_TX_ISO15693_26_1OF4_ASK100 0x0DU |
Type V (ISO 15693 ) load configurations TX Value.
#define PHHAL_HW_PN5180_RF_TX_ISO15693_26_1OF4_ASK10 0x0EU |
Type V (ISO 15693 ) load configurations TX Value.
#define PHHAL_HW_PN5180_RF_TX_ISO180003M3_TARI_18_88_ASK 0x0FU |
ISO 18000P3M3 load configurations TX Value.
#define PHHAL_HW_PN5180_RF_TX_ISO180003M3_TARI_9_44_ASK 0x10U |
ISO 18000P3M3 load configurations TX Value.
#define PHHAL_HW_PN5180_RF_TX_ISO14443A_PICC_106_MANCH_SUBC 0x13U |
Type A Card mode baud rate @ 106 load configurations TX Value.
#define PHHAL_HW_PN5180_RF_TX_ISO14443A_PICC_212_BPSK 0x14U |
Type A Card mode baud rate @ 212 load configurations TX Value.
#define PHHAL_HW_PN5180_RF_TX_ISO14443A_PICC_424_BPSK 0x15U |
Type A Card mode baud rate @ 424 load configurations TX Value.
#define PHHAL_HW_PN5180_RF_TX_ISO14443A_PICC_848_BPSK 0x16U |
Type A Card mode baud rate @ 848 load configurations TX Value.
#define PHHAL_HW_PN5180_RF_TX_NFC_PT_212 0x17U |
Passive Target baud rate @ 212 load configurations TX Value.
#define PHHAL_HW_PN5180_RF_TX_NFC_PT_424 0x18U |
Passive Target baud rate @ 424 load configurations TX Value.
#define PHHAL_HW_PN5180_RF_TX_NFC_AT_106 0x19U |
Active Target baud rate @ 106 load configurations TX Value.
#define PHHAL_HW_PN5180_RF_TX_NFC_AT_212 0x1AU |
Active Target baud rate @ 212 load configurations TX Value.
#define PHHAL_HW_PN5180_RF_TX_NFC_AT_424 0x1BU |
Active Target baud rate @ 424 load configurations TX Value.
#define PHHAL_HW_PN5180_RF_TX_GTM_All_Al 0x1CU |
General Target Mode configuration.
#define PHHAL_HW_PN5180_RF_RX_ISO14443A_106_MANCH_SUBC 0x80U |
Type A baud rate @ 106 load configurations RX Value.
#define PHHAL_HW_PN5180_RF_RX_ISO14443A_212_BPSK 0x81U |
Type A baud rate @ 212 load configurations RX Value.
#define PHHAL_HW_PN5180_RF_RX_ISO14443A_424_BPSK 0x82U |
Type A baud rate @ 424 load configurations RX Value.
#define PHHAL_HW_PN5180_RF_RX_ISO14443A_848_BPSK 0x83U |
Type A baud rate @ 848 load configurations RX Value.
#define PHHAL_HW_PN5180_RF_RX_ISO14443B_106_BPSK 0x84U |
Type B baud rate @ 106 load configurations RX Value.
#define PHHAL_HW_PN5180_RF_RX_ISO14443B_212_BPSK 0x85U |
Type B baud rate @ 212 load configurations RX Value.
#define PHHAL_HW_PN5180_RF_RX_ISO14443B_424_BPSK 0x86U |
Type B baud rate @ 424 load configurations RX Value.
#define PHHAL_HW_PN5180_RF_RX_ISO14443B_848_BPSK 0x87U |
Type B baud rate @ 848 load configurations RX Value.
#define PHHAL_HW_PN5180_RF_RX_FELICA_212 0x88U |
Type F baud rate @ 212 load configurations RX Value.
#define PHHAL_HW_PN5180_RF_RX_FELICA_424 0x89U |
Type F baud rate @ 424 load configurations RX Value.
#define PHHAL_HW_PN5180_RF_RX_NFC_AI_106 0x8AU |
Active Initiator @ baud rate 106 load configurations RX Value.
#define PHHAL_HW_PN5180_RF_RX_NFC_AI_212 0x8BU |
Active Initiator @ baud rate 212 load configurations RX Value.
#define PHHAL_HW_PN5180_RF_RX_NFC_AI_424 0x8CU |
Active Initiator @ baud rate 424 load configurations RX Value.
#define PHHAL_HW_PN5180_RF_RX_ISO15693_26_1OF4_SC 0x8DU |
Type V (ISO 15693 ) load configurations RX Value.
#define PHHAL_HW_PN5180_RF_RX_ISO15693_53_1OF4_SC 0x8EU |
Type V (ISO 15693 ) load configurations RX Value.
#define PHHAL_HW_PN5180_RF_RX_ISO180003M3_MANCH424_4_PERIOD 0x8FU |
ISO 18000P3M3 load configurations RX Value.
#define PHHAL_HW_PN5180_RF_RX_ISO180003M3_MANCH424_2_PERIOD 0x90U |
ISO 18000P3M3 load configurations RX Value.
#define PHHAL_HW_PN5180_RF_RX_ISO180003M3_MANCH848_4_PERIOD 0x91U |
ISO 18000P3M3 load configurations RX Value.
#define PHHAL_HW_PN5180_RF_RX_ISO180003M3_MANCH848_2_PERIOD 0x92U |
ISO 18000P3M3 load configurations RX Value.
#define PHHAL_HW_PN5180_RF_RX_ISO14443A_PICC_106_MILLER 0x93U |
Type A Card mode baud rate @ 106 load configurations RX Value.
#define PHHAL_HW_PN5180_RF_RX_ISO14443A_PICC_212_MILLER 0x94U |
Type A Card mode baud rate @ 212 load configurations RX Value.
#define PHHAL_HW_PN5180_RF_RX_ISO14443A_PICC_424_MILLER 0x95U |
Type A Card mode baud rate @ 424 load configurations RX Value.
#define PHHAL_HW_PN5180_RF_RX_ISO14443A_PICC_848_MILLER 0x96U |
Type A Card mode baud rate @ 848 load configurations RX Value.
#define PHHAL_HW_PN5180_RF_RX_NFC_PT_212 0x97U |
Passive Target baud rate @ 212 load configurations RX Value.
#define PHHAL_HW_PN5180_RF_RX_NFC_PT_424 0x98U |
Passive Target baud rate @ 424 load configurations RX Value.
#define PHHAL_HW_PN5180_RF_RX_NFC_AT_106 0x99U |
Active Initiator baud rate @ 106 load configurations RX Value.
#define PHHAL_HW_PN5180_RF_RX_NFC_AT_212 0x9AU |
Active Initiator baud rate @ 212 load configurations RX Value.
#define PHHAL_HW_PN5180_RF_RX_NFC_AT_424 0x9BU |
Active Initiator baud rate @ 424 load configurations RX Value.
#define PHHAL_HW_PN5180_RF_RX_GTM_All_All 0x9CU |
General Target Mode configuration.
#define PHHAL_HW_CONFIG_SET_LPCD_WAKEUPTIME_MS 0x0070U |
Used value for wakeup counter in msecs, i.e.
after this amount of time IC will wakes up from standby.
#define PHHAL_HW_PN5180_LPCD_MODE_DEFAULT 0x00U |
Default mode.
Try LPCD until timeout is reached.
#define PHHAL_HW_PN5180_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.
phStatus_t phhalHw_Pn5180_Instr_Execute | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
uint8_t | bInstructionCode, | ||
uint8_t * | pInstrPayload, | ||
uint16_t | wInstrPayloadLength, | ||
uint16_t | wExpectedResponseLength, | ||
uint8_t ** | ppInstrResponse | ||
) |
Execute a PN5180 Instruction.
This function can be used the execute any PN5180 instruction. The instruction is composed of bInstructionCode
and pInstrPayload
. If the instruction also results in a response (in case of GET_* instructions) a pointer to a buffer containing the response (ppInstrResponse
) is returned. The caller has to provide the length of the response using wExpectedResponseLength
. Note: GET_* instructions always deliver a response, also in error cases. It's the responsibility of the caller to read out the status register to see if the response is valid (no exception occurred).
PH_ERR_SUCCESS | Execution of instruction successful. |
[in] | pDataParams | DataParams to this layer. |
[in] | bInstructionCode | Instruction code to use. For instance PHHAL_HW_PN5180_SET_INSTR_WRITE_REGISTER |
[in] | pInstrPayload | Payload to be used along with the instruction. |
[in] | wInstrPayloadLength | Length of the payload. |
[in] | wExpectedResponseLength | Number of bytes to be received as a response to the instruction. Only valid for GET_* instructions. 0 in case of SET_* instructions. |
[out] | ppInstrResponse | Pointer to the received response. |
phStatus_t phhalHw_Pn5180_Instr_WriteRegister | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
uint8_t | bRegister, | ||
uint32_t | dwValue | ||
) |
Write a 32 bit value (little endian) to a logical register.
PH_ERR_SUCCESS | Register successfully written. |
PH_ERR_INVALID_PARAMETER | Unknown register address. |
PH_ERR_READ_WRITE_ERROR | Register is read-only. |
[in] | pDataParams | DataParams to this layer. |
[in] | bRegister | Address of the register. |
[in] | dwValue | 32 Bit register value which has to be written. |
phStatus_t phhalHw_Pn5180_Instr_WriteRegisterOrMask | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
uint8_t | bRegister, | ||
uint32_t | dwMask | ||
) |
Perform a logical OR operation on a register using provided mask.
This function is used to modify the content of register using a logical OR operation. The content of the register is read and a logical OR operation is performed with the provided mask. The modified content is written back to the register.
PH_ERR_SUCCESS | Register successfully written. |
PH_ERR_INVALID_PARAMETER | Unknown register address. |
PH_ERR_READ_WRITE_ERROR | Register is read-only. |
[in] | pDataParams | DataParams to this layer. |
[in] | bRegister | Address of the register. |
[in] | dwMask | Bitmask used as operand for logical OR operation. |
phStatus_t phhalHw_Pn5180_Instr_WriteRegisterAndMask | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
uint8_t | bRegister, | ||
uint32_t | dwMask | ||
) |
Perform a logical AND operation on a register using provided mask.
This function is used to modify the content of register using a logical AND operation. The content of the register is read and a logical AND operation is performed with the provided mask. The modified content is written back to the register.
PH_ERR_SUCCESS | Register successfully written. |
PH_ERR_INVALID_PARAMETER | Unknown register address. |
PH_ERR_READ_WRITE_ERROR | Register is read-only. |
[in] | pDataParams | DataParams to this layer. |
[in] | bRegister | Address of the register. |
[in] | dwMask | Bitmask used as operand for logical AND operation. |
phStatus_t phhalHw_Pn5180_Instr_WriteRegisterMultiple | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
uint8_t * | pRegTypeValueSets, | ||
uint16_t | wSizeOfRegTypeValueSets | ||
) |
Perform a write register operation using a set of Register-Value pairs.
This function behaves like phhalHw_Pn5180_Instr_WriteRegister, phhalHw_Pn5180_Instr_WriteRegisterOrMask and phhalHw_Pn5180_Instr_WriteRegisterAndMask with the possibility to combine them. In fact it takes an array of register-type-value set and performs appropriate action. The type reflects the action which is either write register, logical OR operation on a register or logical AND operation on a register. The array is passed in as a buffer (pRegTypeValueSets
) which contains one or more sets. One set consists of 1 byte register address, 1 byte type (see PHHAL_HW_PN5180_WRITE_MULTIPLE_TYPE_WRITE
) and 4 bytes value/mask.
PH_ERR_SUCCESS | All registers successfully modified. |
PH_ERR_INVALID_PARAMETER | At least one unknown register address provided, or general parameter error (e.g. wSizeOfRegTypeValueSets is higher than 258) |
PH_ERR_READ_WRITE_ERROR | At least one register is read-only. |
[in] | pDataParams | DataParams to this layer. |
[in] | pRegTypeValueSets | A buffer containing one or more sets Register-Type-Value sets. |
[in] | wSizeOfRegTypeValueSets | Size of the buffer holding the register-type-value sets. Max. size supported is 258. |
phStatus_t phhalHw_Pn5180_Instr_ReadRegister | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
uint8_t | bRegister, | ||
uint32_t * | pValue | ||
) |
Read back content of a register.
This function is used to read back the content of a logical register whose address is given by bRegister
. The content is available in output parameter pValue
.
PH_ERR_SUCCESS | Register successfully read out. |
PH_ERR_INVALID_PARAMETER | Unknown register address provided or pValue set to NULL. |
PH_ERR_READ_WRITE_ERROR | At least one register is write-only. |
[in] | pDataParams | DataParams to this layer. |
[in] | bRegister | Address of the register. |
[out] | pValue | Pointer to a uint32_t variable, where the result (value of the read out register) shall be written to. |
phStatus_t phhalHw_Pn5180_Instr_ReadRegisterMultiple | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
uint8_t * | pRegisters, | ||
uint8_t | bNumOfRegisters, | ||
uint8_t ** | ppValues | ||
) |
Perform a read register operation on a set of registers.
This function is used to read multiple logical register at once. The order of the register contents/values within the response (ppValues
) corresponds to the order of the register addresses within pRegisters
.
PH_ERR_SUCCESS | All requested registers successfully read out. |
PH_ERR_INVALID_PARAMETER | At least one unknown register address provided, or general parameter error (e.g. bNumOfRegisters is higher than 16) |
PH_ERR_READ_WRITE_ERROR | At least one register is write-only. |
[in] | pDataParams | DataParams to this layer. |
[in] | pRegisters | A buffer containing list of registers (one byte each) to be read out. |
[in] | bNumOfRegisters | Number of registers to be read out (=size of pRegisters ). Maximum size is 16. |
[out] | ppValues | A pointer to a buffer which contains the result, in fact the register values read out. Size of the buffer is 4 * bNumOfRegisters . |
phStatus_t phhalHw_Pn5180_Instr_WriteE2Prom | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
uint8_t | bE2PromAddress, | ||
uint8_t * | pDataToWrite, | ||
uint8_t | bDataLength | ||
) |
Write values sequentially to E2PROM.
This function is used to write one or more values to E2PROM. pDataToWrite
shall contain the data to be written to E2PROM starting at the address bE2PromAddress
. The data is written in sequential order.
PH_ERR_SUCCESS | All data written. |
PH_ERR_INVALID_PARAMETER | pDataToWrite or pDataParams is NULL. |
PH_ERR_PARAMETER_OVERFLOW | Write operation attempts to write beyond end of E2PROM. |
[in] | pDataParams | DataParams to this layer. |
[in] | bE2PromAddress | Start address within E2PROM. |
[in] | pDataToWrite | Data to be written. |
[in] | bDataLength | Number of bytes to be written. |
phStatus_t phhalHw_Pn5180_Instr_ReadE2Prom | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
uint8_t | bE2PromAddress, | ||
uint8_t * | pReadData, | ||
uint8_t | bDataLength | ||
) |
Read values sequentially to E2PROM.
This function is used to write one or more values to E2PROM. pDataToWrite
shall contain the data to be written to E2PROM starting at the address bE2PromAddress
. The data is written in sequential order.
PH_ERR_SUCCESS | All data read. |
PH_ERR_INVALID_PARAMETER | pReadData or pDataParams is NULL. |
PH_ERR_PARAMETER_OVERFLOW | Read operation attempts to read beyond end of E2PROM. |
[in] | pDataParams | DataParams to this layer. |
[in] | bE2PromAddress | Start address within E2PROM. |
[out] | pReadData | Read out data. |
[in] | bDataLength | Number of bytes to be read. |
phStatus_t phhalHw_Pn5180_Instr_WriteTxData | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
uint8_t * | pTxBuffer, | ||
uint16_t | wTxBufferLength | ||
) |
Write Tx data to internal CLIF transmission buffer.
This function is used to write data into the internal CLIF transmission buffer. The size of this buffer is limited to 260 bytes. After this instruction has been executed, an RF transmission can be started by setting corresponding registers.
PH_ERR_SUCCESS | All data written to internal Tx buffer. |
PH_ERR_INVALID_PARAMETER | pTxBuffer or pDataParams is NULL, or wTxBufferLength > 260. |
[in] | pDataParams | DataParams to this layer. |
[in] | pTxBuffer | Buffer containing the data to be used for RF transmission. |
[in] | wTxBufferLength | Size of the buffer pTxBuffer . |
phStatus_t phhalHw_Pn5180_Instr_SendData | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
uint8_t * | pTxBuffer, | ||
uint16_t | wTxBufferLength, | ||
uint8_t | bNumberOfValidBits | ||
) |
Write Tx data to internal RF transmission buffer and start transmission using transceive command.
This function is used to write data to internal CLIF transmission buffer (see phhalHw_Pn5180_Instr_WriteTxData) and, additionally, start the RF transmission. wTxBufferLength
and bNumberOfValidBits
indicate the exact data length to be transmitted. For actual transmission, it is assumed that host has executed the transceiver command (by setting corresponding register). Note: When the instruction returns, transmission might still be ongoing, i.e. the instruction just starts the transmission but does not wait for end of transmission.
PH_ERR_SUCCESS | All data written to internal Tx buffer and transmission started. |
PH_ERR_INVALID_PARAMETER | pTxBuffer or pDataParams is NULL, bTxBufferLength > 260 or bNumberOfValidBits > 7. |
[in] | pDataParams | DataParams to this layer. |
[in] | pTxBuffer | Buffer containing the data to be used for RF transmission. |
[in] | wTxBufferLength | Size of the buffer pTxBuffer . |
[in] | bNumberOfValidBits | Number of valid bits in last byte. 0 means all bits are transferred |
phStatus_t phhalHw_Pn5180_Instr_RetrieveRxData | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
uint8_t ** | pRxBuffer, | ||
uint16_t | wExpectedRxDataLength | ||
) |
Read data back from internal CLIF Rx buffer.
This function is used to retrieve data from internal CLIF receive buffer after successful reception. The size of this buffer is limited to 260 bytes. Note: This instruction does not check if reception was successful.
PH_ERR_SUCCESS | Data successfully read. |
PH_ERR_INVALID_PARAMETER | wExpectedRxDataLength is > 260. |
[in] | pDataParams | DataParams to this layer. |
[in] | pRxBuffer | Pointer to the buffer holding the data. |
[in] | wExpectedRxDataLength | Number of byte to be retrieved. |
phStatus_t phhalHw_Pn5180_Instr_SwitchModeStandby | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
uint8_t | bWakeupControlMask, | ||
uint16_t | wWakeupCounterInMs | ||
) |
Switch to standby mode.
This function is used to put PN5180 into standby mode. The wake up conditions are defined using bWakeupControlMask
parameter. The instruction does not check if system actually entered standby or standby was prevented. An interrupt is raised once PN5180 wakes up or in case standby was prevented. Optionally, a GPO is set on wake up.
PH_ERR_SUCCESS | Instruction successfully executed. |
PH_ERR_INVALID_PARAMETER | No wake up condition defined or wWakeupCounterInMs is out of range. |
[in] | pDataParams | DataParams to this layer. |
[in] | bWakeupControlMask | Bitmask controlling the standby wakeup. For example see: PHHAL_HW_PN5180_WAKEUP_CONTROL_MASK_WUP_ON_COUNTER. |
[in] | wWakeupCounterInMs | Used value for wakeup counter in msecs, i.e. after this amount of time PN5180 wakes up from standby. Maximum value is 2690. |
phStatus_t phhalHw_Pn5180_Instr_SwitchModeLpcd | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
uint16_t | wWakeupCounterInMs | ||
) |
Switch to LPCD mode.
This function is used to put PN5180 into LPCD mode. The wait period in msecs between two LPCD cycles is defined by wWakeupCounterValue
. During wait period PN5180 is in standby. The function returns immediately, i.e. it does not wait until a card has been detected. On detection of a card, PN5180 raises an interrupt and normal mode is entered again.
PH_ERR_SUCCESS | Instruction successfully executed. |
PH_ERR_INVALID_PARAMETER | wWakeupCounterInMs is out of range. |
[in] | pDataParams | DataParams to this layer. |
[in] | wWakeupCounterInMs | Used value for wakeup counter in msecs, i.e. after this amount of time PN5180 wakes up from standby. Maximum value is 2690. |
phStatus_t phhalHw_Pn5180_Instr_SwitchModeAutocoll | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
uint8_t | bRfTechnologyMask, | ||
uint8_t | bAutocollMode | ||
) |
Switch to Autocoll mode.
This function is used to put PN5180 into Autocoll mode in order to handle target mode activation. The termination condition depends on bAutocollMode
. The function returns immediately, i.e. it does not wait until autocoll terminates. Once terminated, autocoll raises an interrupt and normal mode is entered again.
PH_ERR_SUCCESS | Instruction successfully executed. |
PH_ERR_INVALID_PARAMETER | wWakeupCounterInMs is 0. |
[in] | pDataParams | DataParams to this layer. |
[in] | bRfTechnologyMask | Bitmask indicating the RF technology to listen for during Autocoll. For example see PHHAL_HW_PN5180_AUTOCOLL_RF_TECHNOLOGY_MASK_NFC_A. |
[in] | bAutocollMode | Autocoll operation mode to be used. See for example PHHAL_HW_PN5180_AUTOCOLL_MODE_TERMINATE_ON_RF_OFF. |
phStatus_t phhalHw_Pn5180_Instr_MifareAuthenticate | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
uint8_t * | pKey, | ||
uint8_t | bKeyType, | ||
uint8_t | bBlockNo, | ||
uint8_t * | pUid | ||
) |
Perform authentication on an activated Mifare Classic card.
This function is used to perform a Mifare Classic Authentication on an activated card. It takes the key, card UID and the key type to authenticate at given block address.
PH_ERR_SUCCESS | Authentication successful. |
PH_ERR_INVALID_PARAMETER | bKeyType wrong, pUid or pKey is NULL. |
PH_ERR_IO_TIMEOUT | Timeout during authentication. |
PH_ERR_AUTH_ERROR | Authentication failed. |
[in] | pDataParams | DataParams to this layer. |
[in] | pKey | Key to be used for authentication. uint8_t[6]. |
[in] | bKeyType | Key type. Either PHHAL_HW_MFC_KEYA or PHHAL_HW_MFC_KEYB. |
[in] | bBlockNo | Block-Number on card to authenticate to. |
[in] | pUid | UID of the activated card. uint8_t[4]. |
phStatus_t phhalHw_Pn5180_Instr_EpcGen2Inventory | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
uint8_t * | pSelectCommand, | ||
uint8_t | bSelectCommandLength, | ||
uint8_t | bSelectCommandBitsInLastByte, | ||
uint8_t * | pBeginRoundCmmand, | ||
uint8_t | bTimeslotProcessingBehavior | ||
) |
Perform an ISO 18000-3M3 Inventory.
This function is used to perform an inventory of ISO18000-3M3 tags. It implements an autonomous execution of several commands according to ISO18000-3M3 in order to guarantee the timings specified by that standard.
PH_ERR_SUCCESS | Inventory executed, internal response buffer filled according to the bTimeslotProcessingBehavior policy. |
PH_ERR_INVALID_PARAMETER | pBeginRoundCommand is NULL or wrong value for one of bTimeslotProcessingBehavior , bSelectCommandBitsInLastByte or bSelectCommandLength . |
[in] | pDataParams | DataParams to this layer. |
[in] | pSelectCommand | If present (not NULL) it contains the Select command (according to ISO18000-3, Table 47) which is sent prior to BeginRound command. CRC-16c shall not be included. Size of the buffer is between 1-39 bytes, inclusive. |
[in] | bSelectCommandLength | Size of pSelectCommand buffer. 0 in case no Select Command shall be sent, otherwise 1-39. |
[in] | bSelectCommandBitsInLastByte | Number of bits to be transmitted in the last byte of pSelectCommand . 0 in case all bits shall be transmitted, otherwise 1-7. |
[in] | pBeginRoundCmmand | Buffer containing BeginRound command (according to ISO18000-3, Table 49). CRC-5 shall not be included. uint8_t[3]. |
[in] | bTimeslotProcessingBehavior | Timeslot processing behavior. Indicates how many timeslots shall be processed before returning response to the host. For example see: PHHAL_HW_PN5180_EPC_GEN2_TIMESLOT_FILL_BUFFER. |
phStatus_t phhalHw_Pn5180_Instr_EpcGen2RetrieveResultSize | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
uint16_t * | pResultSize | ||
) |
Retrieve the size of a pending EPC GEN2 inventory result.
This function is used to retrieve the size of the inventory result. The size reflects the payload size of the response to the next execution phhalHw_Pn5180_Instr_EpcGen2RetrieveResult. If the size is 0, then no more results are available which means inventory algorithm has finished.
PH_ERR_SUCCESS | Instruction successfully executed, result size available in pResultSize . |
PH_ERR_INVALID_PARAMETER | wResultSize is NULL. |
[in] | pDataParams | DataParams to this layer. |
[out] | pResultSize | Size of the inventory result. |
phStatus_t phhalHw_Pn5180_Instr_EpcGen2RetrieveResult | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
uint8_t ** | ppInventoryResult, | ||
uint16_t | wResultSize | ||
) |
Return the result of inventory.
This function is used to retrieve the result of a preceding call to phhalHw_Pn5180_Instr_EpcGen2Inventory or phhalHw_Pn5180_Instr_EpcGen2ResumeInventory instruction The size of the response is determined by pResultSize
of phhalHw_Pn5180_Instr_EpcGen2RetrieveResultSize. The result (available in ppInventoryResult
) actually contains the result for one or more processed timeslots.
PH_ERR_SUCCESS | Instruction successfully executed, result size available in wResultSize . |
PH_ERR_INVALID_PARAMETER | wResultSize is NULL. |
[in] | pDataParams | DataParams to this layer. |
[out] | ppInventoryResult | 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 Timeslot Status ( 0 - Tag response available. "Tag Reply Length" field, "Valid bits in last byte" field, and "Tag reply" field present. 1 - Tag response available. "Tag Reply Length" field, "Valid bits in last byte" field, "Tag reply" field and "Tag handle" field present. 2 - No tag replied in timeslot. "Tag Reply Length" field, "Valid bits in last byte" field, and "Tag reply" field shall not be present. 3 - Two or more tags responded in the timeslot. (Collision). "Tag Reply Length" field, "Valid bits in last byte" field, and "Tag reply" field shall not be 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 field "Timeslot Status" is set to "1". Otherwise field not present. |
[in] | wResultSize | Size of the inventory result. phhalHw_Pn5180_Instr_EpcGen2RetrieveResultSize has to be called to retrieve the size. |
phStatus_t phhalHw_Pn5180_Instr_EpcGen2ResumeInventory | ( | phhalHw_Pn5180_DataParams_t * | pDataParams | ) |
Resume an ISO 18000-3M3 Inventory.
This function is used to resume the inventory algorithm in case it is paused. More specifically, this instruction has to be repeatedly called, as long as pResultSize
of phhalHw_Pn5180_Instr_EpcGen2RetrieveResultSize is greater than 0. Typical sequence for a complete EPC GEN2 inventory is 1.) phhalHw_Pn5180_Instr_EpcGen2Inventory 2.) phhalHw_Pn5180_Instr_EpcGen2RetrieveResultSize 3.) if pResultSize
is 0, inventory has finished. 4.) phhalHw_Pn5180_Instr_EpcGen2RetrieveResult 5.) phhalHw_Pn5180_Instr_EpcGen2ResumeInventory 6.) Go to step 2.
PH_ERR_SUCCESS | Inventory resumed, internal response buffer filled according to the bTimeslotProcessingBehavior policy set during execution of phhalHw_Pn5180_Instr_EpcGen2Inventory. |
[in] | pDataParams | DataParams to this layer. |
phStatus_t phhalHw_Pn5180_Instr_LoadRfConfiguration | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
uint8_t | bRfTxConfiguration, | ||
uint8_t | bRfRxConfiguration | ||
) |
Load RF Tx and Rx settings from E2PROM.
This function is used to load the RF configuration from E2PROM into internal CLIF registers. RF configuration refers to a unique combination of RF Technology, mode (target/initiator) and baud rate. RF configuration can be loaded separately for the CLIF receiver (Rx configuration) and transmitter (Tx configuration) path.
PH_ERR_SUCCESS | RF configuration successfully loaded. |
PH_ERR_INVALID_PARAMETER | bTxConfiguration or bRxConfiguration out of range. |
[in] | pDataParams | DataParams to this layer. |
[in] | bRfTxConfiguration | Tx configuration index to be used. 0xff means Tx Configuration is not modified. |
[in] | bRfRxConfiguration | Rx configuration index to be used. 0xff means Rx Configuration is not modified. |
phStatus_t phhalHw_Pn5180_Instr_UpdateRfConfiguration | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
uint8_t * | pRfConfiguration, | ||
uint8_t | bRfConfigurationSize | ||
) |
Update the RF configuration.
This function is used to update the RF configuration within E2PROM. Only registers available within the respective RF configuration can be updated, registers can't be added or removed.
PH_ERR_SUCCESS | RF configuration successfully updated. |
PH_ERR_INVALID_PARAMETER | bRfConfigurationSize not a multiple of 6 or out of range. pRfConfiguration is NULL. |
[in] | pDataParams | DataParams to this layer. |
[in] | pRfConfiguration | Array containing one or more configurations to be written. One configuration is a set of 1 Byte Rx or Tx configuration index 1 Byte Register address within the RF configuration 4 Bytes value to be written into the register. |
[in] | bRfConfigurationSize | Size of pRfConfiguration . Must be a multiple of 6, maximum value is 252. |
phStatus_t phhalHw_Pn5180_Instr_RetrieveRfConfigurationSize | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
uint8_t | bRfConfiguration, | ||
uint8_t * | pNumOfRegisters | ||
) |
Retrieve the number of register-value pairs of the RF configuration.
This function is used to retrieve the size (number of registers) of a given RF configuration.
PH_ERR_SUCCESS | RF configuration size retrieved. |
PH_ERR_INVALID_PARAMETER | bRfConfiguration out of range or pNumOfRegisters is NULL. |
[in] | pDataParams | DataParams to this layer. |
[in] | bRfConfiguration | Rf Tx or Rx configuration index to be used. |
[out] | pNumOfRegisters | Number of registers (register-value pairs) within given Rf configuration. |
phStatus_t phhalHw_Pn5180_Instr_RetrieveRfConfiguration | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
uint8_t | bRfConfiguration, | ||
uint8_t ** | ppRfConfiguration, | ||
uint8_t | bNumOfRegisters | ||
) |
Retrieve the RF configuration.
This function is used to read out an RF configuration. The register address-value-pairs are available in ppRfConfiguration
. In order to know how many pairs are to be expected, first phhalHw_Pn5180_Instr_RetrieveRfConfigurationSize has to be executed.
PH_ERR_SUCCESS | RF configuration successfully retrieved. |
PH_ERR_INVALID_PARAMETER | bRfConfiguration out of range. |
[in] | pDataParams | DataParams to this layer. |
[in] | bRfConfiguration | Rf Tx or Rx configuration index to be used. |
[out] | ppRfConfiguration | Pointer to a buffer containing bNumOfRegisters configurations. One configuration is a set of 1 Byte Register address within the RF configuration 4 Bytes value to be written into the register. |
[in] | bNumOfRegisters | Number of registers (register-value pairs) within given Rf configuration. To be retrieved upfront using phhalHw_Pn5180_Instr_RetrieveRfConfigurationSize. |
phStatus_t phhalHw_Pn5180_Instr_RfOn | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
uint8_t | bRfOnConfig | ||
) |
Turns the RF field ON.
This function is used to turn the RF field ON. The configurations are available in ppRfOnConfig
.
PH_ERR_SUCCESS | RF Field turn ON sent to IC. |
PH_ERR_INVALID_PARAMETER | bRfOnConfig out of range. |
[in] | pDataParams | DataParams to this layer. |
[in] | bRfOnConfig | The ON Configuration. |
phStatus_t phhalHw_Pn5180_Instr_RfOff | ( | phhalHw_Pn5180_DataParams_t * | pDataParams | ) |
Turns the RF field OFF.
This function is used to turn the RF field OFF.
PH_ERR_SUCCESS | RF Field turn OFF sent to IC. |
PH_ERR_INVALID_PARAMETER | PData params is null. |
[in] | pDataParams | DataParams to this layer. |
phStatus_t phhalHw_Pn5180_Instr_ConfigureTestBusDigital | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
uint8_t | bTBSelect, | ||
uint8_t * | pTBpos, | ||
uint8_t | bTBposSize | ||
) |
Configures the Digital Test BUS.
This function is used to configure the Digital Test Bus.
PH_ERR_SUCCESS | If the TestBus is configured successfully. |
PH_ERR_INVALID_PARAMETER | PData params is null. |
[in] | pDataParams | DataParams to this layer. |
[in] | bTBSelect | This value is written to the CLIF_TBCONTROL_REG. |
[in] | pTBpos | 0xXY (X - Pad Location, Y - Testbus Bit position). |
[in] | bTBposSize | pTBpos size 0 to 6 bytes. |
phStatus_t phhalHw_Pn5180_Instr_ConfigureTestBusAnalog | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
uint8_t | bDAC1Config, | ||
uint8_t | bDAC0Config | ||
) |
Configures the Analog Test BUS.
This function is used to configure the Digital Test Bus.
PH_ERR_SUCCESS | If the TestBus is configured successfully. |
PH_ERR_INVALID_PARAMETER | PData params is null. |
[in] | pDataParams | DataParams to this layer. |
[in] | bDAC1Config | define dac1 sources . |
[in] | bDAC0Config | define dac0 sources . |
phStatus_t phhalHw_Pn5180_Instr_GetHALVersion | ( | uint16_t * | pValue | ) |
Returns the current version of HAL only for I&V reporting purposes.
This function returns the current version of HAL only for I&V reporting purposes.
PH_ERR_SUCCESS | when version number is returned. |
[out] | pValue | Version information. |
phStatus_t phhalHw_Pn5180_Int_LPCD_SetConfig | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
uint16_t | wConfig, | ||
uint16_t | wValue | ||
) |
Set config for LFCD which is IC specific.
This function can be used to set configuration parametrs of LPCD.
PH_ERR_SUCCESS | when successful. |
phStatus_t phhalHw_Pn5180_Int_LPCD_GetConfig | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
uint16_t | wConfig, | ||
uint16_t * | pValue | ||
) |
Get config for LFCD which is IC specific.
This function can be used to get configuration parameters of LPCD.
PH_ERR_SUCCESS | when successful. |
phStatus_t phhalHw_Pn5180_Instr_SwitchModeNormal | ( | phhalHw_Pn5180_DataParams_t * | pDataParams | ) |
Switch to Normal mode.
This function is used to put PN5180 into Normal mode.
PH_ERR_SUCCESS | Instruction successfully executed. |