NXP NFC Reader Library
v4.040.05.011646
|
Pn5180 Int functions. More...
![]() |
Macros | |
#define | TIMER_FREQ 13.56 |
Pn5180 clk frequency. More... | |
#define | TMR_RELOAD_VALUE_MASK (0x000FFFFFUL) |
The reload mask for the timer, also the maximum value that can be loaded into the timer reload register. More... | |
#define | PHHAL_HW_PN5180_MAX_FREQ 13560000 |
Pn5180 clk Maximum frequency = 13.56 MHz. More... | |
#define | PHHAL_HW_PN5180_MIN_FREQ 53000 |
Pn5180 clk Minimum frequency = 53 KHz. More... | |
#define | PHHAL_HW_PN5180_MAX_TIME_DELAY_MS 19784 |
Pn5180 Maximum Time Delay in milli second = 19.78443396226. More... | |
#define | PHHAL_HW_PN5180_MIN_TIME_DELAY_US 1 |
Pn5180 Minimum Time Delay in micro second = 0.00001886792. More... | |
#define | PHHAL_HW_PN5180_CONVERSION_MS_SEC 1000 |
MilliSec to Sec (In denominator for calculation purpose) –> 1000. More... | |
#define | PHHAL_HW_PN5180_CONVERSION_US_SEC 1000000 |
MicroSec to Sec (In denominator for calculation purpose) –> 1000000. More... | |
#define | PHHAL_HW_PN5180_I14443_ADD_DELAY_US 15 |
Additional digital timeout delay for ISO14443. More... | |
#define | PHHAL_HW_PN5180_I15693_ADD_DELAY_US 120 |
Additional digital timeout delay for ISO15693. More... | |
#define | PHHAL_HW_CHECK_IRQ_PIN_MASK 0x01U |
Mask to Check for the IRQ PIN instead of polling for Status. | |
#define | PHHAL_HW_DISABLE_IRQ_CLEAR_MASK 0x80U |
Mask to Disable the Clear of IRQ During the Wait for IRQ. | |
Functions | |
phStatus_t | phhalHw_Pn5180_GetRxBuffer (phhalHw_Pn5180_DataParams_t *pDataParams, uint8_t bIsExchange, uint8_t **pRxBuffer, uint16_t *pRxBufferLen, uint16_t *pRxBufferSize) |
Returns the RxBuffer pointer, length and size. More... | |
phStatus_t | phhalHw_Pn5180_GetTxBuffer (phhalHw_Pn5180_DataParams_t *pDataParams, uint8_t bIsExchange, uint8_t **pTxBuffer, uint16_t *pTxBufferLen, uint16_t *pTxBufferSize) |
Returns the TxBuffer pointer, length and size. More... | |
phStatus_t | phhalHw_Pn5180_SetConfig_Int (phhalHw_Pn5180_DataParams_t *pDataParams, uint16_t wConfig, uint16_t wValue) |
Internal set config function. More... | |
phStatus_t | phhalHw_Pn5180_ReadData (phhalHw_Pn5180_DataParams_t *pDataParams, uint8_t **pData, uint16_t *pBytesRead) |
Reads the data from the h/w buffer. More... | |
phStatus_t | phhalHw_Pn5180_TimerStart (phhalHw_Pn5180_DataParams_t *pDataParams, uint8_t bTimer, uint32_t dwStartCond, uint32_t dwStopCond, uint32_t wPrescaler, uint32_t dwLoadValue) |
Generic timer routine. More... | |
phStatus_t | phhalHw_Pn5180_SetCardMode (phhalHw_Pn5180_DataParams_t *pDataParams, uint16_t wTxDataRate, uint16_t wRxDataRate, uint16_t wSubcarrier) |
Apply card mode register settings (Tx and Rx Data Rate) according to given parameters. More... | |
phStatus_t | phhalHw_Pn5180_SetTmo (phhalHw_Pn5180_DataParams_t *pDataParams, uint16_t wTimeout, uint8_t bUnit) |
Starts the timer as part of the time out behaviour. More... | |
phStatus_t | phhalHw_Pn5180_Int_Wait (phhalHw_Pn5180_DataParams_t *pDataParams, uint32_t dwLoadValue, uint32_t wPrescaler) |
Internal wait function. More... | |
phStatus_t | phhalHw_Pn5180_Int_GetDigiDelay (phhalHw_Pn5180_DataParams_t *pDataParams, uint8_t bIsTimeout, uint16_t *pDelayUs) |
Internal Get Digital Delay time function. More... | |
phStatus_t | phhalHw_Pn5180_Int_GetFdt (phhalHw_Pn5180_DataParams_t *pDataParams, phStatus_t wExchangeStatus, uint32_t *pTime) |
Internal Get Frame Delay time function. More... | |
phStatus_t | phhalHw_Pn5180_Receive_Int (phhalHw_Pn5180_DataParams_t *pDataParams, uint32_t dwIrqWaitFor, uint8_t **ppRxBuffer, uint16_t *pRxLength, uint8_t bIrqEnable) |
PN5180 implementation of common receive functionality. More... | |
phStatus_t | phhalHw_Pn5180_Int_IdleCommand (phhalHw_Pn5180_DataParams_t *pDataParams) |
PN5180 implementation of loading of idle command. More... | |
phStatus_t | phhalHw_Pn5180_Int_LoadCommand (phhalHw_Pn5180_DataParams_t *pDataParams, uint8_t bCmd) |
PN5180 implementation of loading a command. More... | |
phStatus_t | phhalHw_Pn5180_AutoSyncByte (phhalHw_Pn5180_DataParams_t *pDataParams) |
PN5180 implementation of handling the F0 Sync byte automatically for P2P data exchange. More... | |
Rf Datarate Values | |
#define | PHHAL_HW_RF_DATARATE_NO_CHANGE 0x00FFU |
Data rate no change. More... | |
RF_STATUS_RF_ACTIVE_ERROR_CAUSE Values | |
#define | RF_ACTIVE_ERROR_NO_EXT_FIELD_DETECTED 3 |
FSD Values | |
#define | PHHAL_HW_PN5180_MAX_FSD 256 |
Pn5180 Int functions.
#define TIMER_FREQ 13.56 |
Pn5180 clk frequency.
#define TMR_RELOAD_VALUE_MASK (0x000FFFFFUL) |
The reload mask for the timer, also the maximum value that can be loaded into the timer reload register.
#define PHHAL_HW_PN5180_MAX_FREQ 13560000 |
Pn5180 clk Maximum frequency = 13.56 MHz.
#define PHHAL_HW_PN5180_MIN_FREQ 53000 |
Pn5180 clk Minimum frequency = 53 KHz.
#define PHHAL_HW_PN5180_MAX_TIME_DELAY_MS 19784 |
Pn5180 Maximum Time Delay in milli second = 19.78443396226.
#define PHHAL_HW_PN5180_MIN_TIME_DELAY_US 1 |
Pn5180 Minimum Time Delay in micro second = 0.00001886792.
#define PHHAL_HW_PN5180_CONVERSION_MS_SEC 1000 |
MilliSec to Sec (In denominator for calculation purpose) –> 1000.
#define PHHAL_HW_PN5180_CONVERSION_US_SEC 1000000 |
MicroSec to Sec (In denominator for calculation purpose) –> 1000000.
#define PHHAL_HW_PN5180_I14443_ADD_DELAY_US 15 |
Additional digital timeout delay for ISO14443.
#define PHHAL_HW_PN5180_I15693_ADD_DELAY_US 120 |
Additional digital timeout delay for ISO15693.
#define PHHAL_HW_RF_DATARATE_NO_CHANGE 0x00FFU |
Data rate no change.
phStatus_t phhalHw_Pn5180_GetRxBuffer | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
uint8_t | bIsExchange, | ||
uint8_t ** | pRxBuffer, | ||
uint16_t * | pRxBufferLen, | ||
uint16_t * | pRxBufferSize | ||
) |
Returns the RxBuffer pointer, length and size.
PH_ERR_SUCCESS | Operation successful. |
[in] | pDataParams | DatParams to this layer. |
[in] | bIsExchange | Exchange option specifier. |
[out] | pRxBuffer | Pointer to HAL RX buffer. |
[out] | pRxBufferLen | Length of the buffer. |
[out] | pRxBufferSize | Size of the buffer. |
phStatus_t phhalHw_Pn5180_GetTxBuffer | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
uint8_t | bIsExchange, | ||
uint8_t ** | pTxBuffer, | ||
uint16_t * | pTxBufferLen, | ||
uint16_t * | pTxBufferSize | ||
) |
Returns the TxBuffer pointer, length and size.
PH_ERR_SUCCESS | Operation successful. |
[in] | pDataParams | DatParams to this layer. |
[in] | bIsExchange | Exchange option specifier. |
[out] | pTxBuffer | Pointer to HAL TX buffer. |
[out] | pTxBufferLen | Length of the buffer. |
[out] | pTxBufferSize | Size of the buffer. |
phStatus_t phhalHw_Pn5180_SetConfig_Int | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
uint16_t | wConfig, | ||
uint16_t | wValue | ||
) |
Internal set config function.
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. |
[in] | pDataParams | DatParams to this layer. |
[in] | wConfig | SetConfig option. |
[in] | wValue | SetConfig value. |
phStatus_t phhalHw_Pn5180_ReadData | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
uint8_t ** | pData, | ||
uint16_t * | pBytesRead | ||
) |
Reads the data from the h/w buffer.
[in] | pDataParams | DatParams to this layer. |
[out] | pData | Data read from the h/w FIFO. |
[out] | pBytesRead | Number of bytes read. |
phStatus_t phhalHw_Pn5180_TimerStart | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
uint8_t | bTimer, | ||
uint32_t | dwStartCond, | ||
uint32_t | dwStopCond, | ||
uint32_t | wPrescaler, | ||
uint32_t | dwLoadValue | ||
) |
Generic timer routine.
[in] | pDataParams | DatParams to this layer. |
[in] | bTimer | Timer1/2/3 to be used. |
[in] | dwStartCond | Stop condition(s) for timer. |
[in] | dwStopCond | Start condition(s) for timer. |
[in] | wPrescaler | Prescalar to be used. |
[in] | dwLoadValue | Value to be loaded to the timer count. |
phStatus_t phhalHw_Pn5180_SetCardMode | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
uint16_t | wTxDataRate, | ||
uint16_t | wRxDataRate, | ||
uint16_t | wSubcarrier | ||
) |
Apply card mode register settings (Tx and Rx Data Rate) according to given parameters.
PH_ERR_SUCCESS | Operation successful. |
Other | Depending on implementation and underlying component. |
[in] | pDataParams | DatParams to this layer. |
[in] | wTxDataRate | TX data rate to be used. |
[in] | wRxDataRate | RX data rate to be used. |
[in] | wSubcarrier | Sub carrier to be used. |
phStatus_t phhalHw_Pn5180_SetTmo | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
uint16_t | wTimeout, | ||
uint8_t | bUnit | ||
) |
Starts the timer as part of the time out behaviour.
PH_ERR_SUCCESS | Operation successful. |
Other | Depending on implementation and underlying component. |
[in] | pDataParams | DatParams to this layer. |
[in] | wTimeout | Time out period. |
[in] | bUnit | The unit unit used for specifying the delay. |
phStatus_t phhalHw_Pn5180_Int_Wait | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
uint32_t | dwLoadValue, | ||
uint32_t | wPrescaler | ||
) |
Internal wait function.
PH_ERR_SUCCESS | Operation successful. |
Other | Depending on implementation and underlying component. |
[in] | pDataParams | DatParams to this layer. |
[in] | dwLoadValue | the load count. |
[in] | wPrescaler | Prescalar for the timer. |
phStatus_t phhalHw_Pn5180_Int_GetDigiDelay | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
uint8_t | bIsTimeout, | ||
uint16_t * | pDelayUs | ||
) |
Internal Get Digital Delay time function.
PH_ERR_SUCCESS | Operation successful. |
Other | Depending on implementation and underlying component. |
[in] | pDataParams | DatParams to this layer. |
[in] | bIsTimeout | Timeout status. |
[out] | pDelayUs | Delay time. |
phStatus_t phhalHw_Pn5180_Int_GetFdt | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
phStatus_t | wExchangeStatus, | ||
uint32_t * | pTime | ||
) |
Internal Get Frame Delay time function.
PH_ERR_SUCCESS | Operation successful. |
Other | Depending on implementation and underlying component. |
[in] | pDataParams | DatParams to this layer. |
[in] | wExchangeStatus | Exchange status. |
[out] | pTime | Timeout value. |
phStatus_t phhalHw_Pn5180_Receive_Int | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
uint32_t | dwIrqWaitFor, | ||
uint8_t ** | ppRxBuffer, | ||
uint16_t * | pRxLength, | ||
uint8_t | bIrqEnable | ||
) |
PN5180 implementation of common receive functionality.
PH_ERR_SUCCESS | Operation successful. |
Other | Depending on implementation and underlying component. |
[in] | pDataParams | DatParams to this layer. |
[in] | dwIrqWaitFor | Irqs to wait for. |
[out] | ppRxBuffer | Rx buffer. |
[out] | pRxLength | received length. |
[in] | bIrqEnable | enable IRQs. |
phStatus_t phhalHw_Pn5180_Int_IdleCommand | ( | phhalHw_Pn5180_DataParams_t * | pDataParams | ) |
PN5180 implementation of loading of idle command.
PH_ERR_SUCCESS | Operation successful. |
Other | Depending on implementation and underlying component. |
[in] | pDataParams | DatParams to this layer. |
phStatus_t phhalHw_Pn5180_Int_LoadCommand | ( | phhalHw_Pn5180_DataParams_t * | pDataParams, |
uint8_t | bCmd | ||
) |
PN5180 implementation of loading a command.
PH_ERR_SUCCESS | Operation successful. |
Other | Depending on implementation and underlying component. |
[in] | pDataParams | DatParams to this layer. |
[in] | bCmd | CMD to load |
phStatus_t phhalHw_Pn5180_AutoSyncByte | ( | phhalHw_Pn5180_DataParams_t * | pDataParams | ) |
PN5180 implementation of handling the F0 Sync byte automatically for P2P data exchange.
PH_ERR_SUCCESS | Operation successful. |
Other | Depending on implementation and underlying component. |