NXP NFC Reader Library  v4.040.05.011646

Internal definitions. More...

Collaboration diagram for Internal:

Macros

#define PHHAL_HW_RC523_TIMER_FREQ   13.56f
 RC internal timer frequency. More...
 
#define PHHAL_HW_RC523_TIMER_MAX_VALUE_US   39586813
 RC maximum timer value in microseconds. More...
 
#define PHHAL_HW_RC523_TIMER_SHIFT   4.8f
 Shift of the internal RC timer in ETUs. More...
 
#define PHHAL_HW_RC523_ETU_106   9.44f
 Duration of one ETU at 106 kBit/s in [us]. More...
 
#define PHHAL_HW_RC523_ETU_212   4.7f
 Duration of one ETU at 212 kBit/s in [us]. More...
 
#define PHHAL_HW_RC523_ETU_424   2.4f
 Duration of one ETU at 424 kBit/s in [us]. More...
 
#define PHHAL_HW_RC523_ETU_848   1.2f
 Duration of one ETU at 848 kBit/s in [us]. More...
 
#define PHHAL_HW_RC523_REQC_MIN_LEN   19U
 Minimum length of valid ReqC response when multiple reception is enable. More...
 
#define PHHAL_HW_RC523_MFC_AUTHA_CMD   0x60U
 MIFARE(R) Classic AUTHA command code. More...
 
#define PHHAL_HW_RC523_MFC_AUTHB_CMD   0x61U
 MIFARE(R) Classic AUTHB command code. More...
 

Functions

phStatus_t phhalHw_Rc523_WriteFifo (phhalHw_Rc523_DataParams_t *pDataParams, uint8_t *pData, uint16_t wLength, uint16_t *pBytesWritten)
 Write Data to Fifo buffer. More...
 
phStatus_t phhalHw_Rc523_ReadFifo (phhalHw_Rc523_DataParams_t *pDataParams, uint16_t wBufSize, uint8_t *pData, uint16_t *pLength)
 Read Data from Fifo buffer. More...
 
phStatus_t phhalHw_Rc523_FlushFifo (phhalHw_Rc523_DataParams_t *pDataParams)
 Clear Fifo buffer. More...
 
phStatus_t phhalHw_Rc523_WriteData (phhalHw_Rc523_DataParams_t *pDataParams, uint8_t bAddress, uint8_t *pData, uint16_t wLength)
 Write multiple values to a single register address. More...
 
phStatus_t phhalHw_Rc523_ReadData (phhalHw_Rc523_DataParams_t *pDataParams, uint8_t bAddress, uint16_t wLength, uint8_t *pData)
 Read multiple values from single register address. More...
 
phStatus_t phhalHw_Rc523_ExchangeTransmit (phhalHw_Rc523_DataParams_t *pDataParams, uint8_t bCmdCode, uint8_t *pTxBuffer, uint16_t wTxLength)
 Transmit part of Exchange command. More...
 
phStatus_t phhalHw_Rc523_ExchangeReceive (phhalHw_Rc523_DataParams_t *pDataParams, uint8_t **ppRxBuffer, uint16_t *pRxLength)
 Receive part of Exchange command. More...
 
phStatus_t phhalHw_Rc523_SetFdt (phhalHw_Rc523_DataParams_t *pDataParams, uint16_t wConfig, uint16_t wTimeout)
 This function will calculate and store Timer Pre-scaler and Timer ReLoad values (Lower and Higher bytes). More...
 
phStatus_t phhalHw_Rc523_GetFdt (phhalHw_Rc523_DataParams_t *pDataParams, phStatus_t wExchangeStatus, uint32_t *pTime)
 Retrieves the Frame Delay Time of the last command. More...
 
phStatus_t phhalHw_Rc523_GetTxBuffer (phhalHw_Rc523_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_Rc523_GetRxBuffer (phhalHw_Rc523_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_Rc523_WaitIrq (phhalHw_Rc523_DataParams_t *pDataParams, uint8_t bIrq0WaitFor, uint8_t bIrq1WaitFor, uint8_t *pIrq0Reg, uint8_t *pIrq1Reg)
 Wait until one of the given interrupts occurs. More...
 
phStatus_t phhalHw_Rc523_LoadTimeout (phhalHw_Rc523_DataParams_t *pDataParams)
 Configure registers for Frame Delay Time (Timeout) values. More...
 
phStatus_t phhalHw_Rc523_StartTxWaitTimer (phhalHw_Rc523_DataParams_t *pDataParams)
 Configure registers for TxWait and start timer. More...
 
void phhalHw_Rc523_CreateRespFrame (uint8_t *bInBuff, uint8_t bDataPos, uint8_t *bOutBuff)
 This function will return the answer to ReqC in 32 byte multi slot frame format. More...
 
phStatus_t phhalHw_Rc523_FrameRxMultiplePkt (phhalHw_Rc523_DataParams_t *pDataParams)
 Frame packet which contains a series of ReqC responses(if multiple response received) in multi-slot response format and update Hal Rx buffer. More...
 
phStatus_t phhalHw_Rc523_CheckForEmdError (phhalHw_Rc523_DataParams_t *pDataParams, uint8_t bIrq0WaitFor, uint8_t bIrq1WaitFor, uint8_t *pIrq0Reg, uint8_t *pIrq1Reg)
 EMD error handling function on PN512. More...
 
phStatus_t phhalHw_Rc523_ReStartRx (phhalHw_Rc523_DataParams_t *pDataParams)
 Restart Receiver function on PN512. More...
 
phStatus_t phhalHw_Rc523_GetMultiReg (phhalHw_Rc523_DataParams_t *pDataParams, uint8_t *pData)
 Get MultiReg function on PN512. More...
 
phStatus_t phhalHw_Rc523_GetError (phhalHw_Rc523_DataParams_t *pDataParams)
 Get error from ErrorReg of PN512. More...
 

Timing related constants

#define PHHAL_HW_RC523_FELICA_ADD_DELAY_US   240U
 Additional digital timeout delay for Felica. More...
 

RS232 speed settings

#define PHHAL_HW_RC523_SERIALSPEED_7200   0xFAU
 7.200 kBit/s. More...
 
#define PHHAL_HW_RC523_SERIALSPEED_9600   0xEBU
 9.600 kBit/s. More...
 
#define PHHAL_HW_RC523_SERIALSPEED_14400   0xDAU
 14.400 kBit/s. More...
 
#define PHHAL_HW_RC523_SERIALSPEED_19200   0xCBU
 19.200 kBit/s. More...
 
#define PHHAL_HW_RC523_SERIALSPEED_38400   0xABU
 38.400 kBit/s. More...
 
#define PHHAL_HW_RC523_SERIALSPEED_57600   0x9AU
 57.500 kBit/s. More...
 
#define PHHAL_HW_RC523_SERIALSPEED_115200   0x7AU
 115.200 kBit/s. More...
 
#define PHHAL_HW_RC523_SERIALSPEED_128000   0x74U
 128.000 kBit/s. More...
 
#define PHHAL_HW_RC523_SERIALSPEED_230400   0x5AU
 230.400 kBit/s. More...
 
#define PHHAL_HW_RC523_SERIALSPEED_460800   0x3AU
 460.800 kBit/s. More...
 
#define PHHAL_HW_RC523_SERIALSPEED_921600   0x1CU
 921.600 kBit/s. More...
 
#define PHHAL_HW_RC523_SERIALSPEED_1228800   0x15U
 1.228.800 kBit/s. More...
 

EMD noise detection settings

#define PHHAL_HWRC523_EMD_NOISE_ERROR   (PHHAL_HW_RC523_BIT_COLLERR | PHHAL_HW_RC523_BIT_CRCERR | PHHAL_HW_RC523_BIT_PARITYERR | PHHAL_HW_RC523_BIT_PROTERR)
 
#define PHHAL_HWRC523_EMD_NOISE_CHECK(dwReg)
 
#define PHHAL_HW_RC523_EMV_NOISE_MAXLEN   2U
 
#define PHHAL_HW_RC523_ISO_NOISE_MAXLEN   1U
 

Detailed Description

Internal definitions.

Macro Definition Documentation

§ PHHAL_HW_RC523_TIMER_FREQ

#define PHHAL_HW_RC523_TIMER_FREQ   13.56f

RC internal timer frequency.

§ PHHAL_HW_RC523_TIMER_MAX_VALUE_US

#define PHHAL_HW_RC523_TIMER_MAX_VALUE_US   39586813

RC maximum timer value in microseconds.

§ PHHAL_HW_RC523_TIMER_SHIFT

#define PHHAL_HW_RC523_TIMER_SHIFT   4.8f

Shift of the internal RC timer in ETUs.

§ PHHAL_HW_RC523_ETU_106

#define PHHAL_HW_RC523_ETU_106   9.44f

Duration of one ETU at 106 kBit/s in [us].

§ PHHAL_HW_RC523_ETU_212

#define PHHAL_HW_RC523_ETU_212   4.7f

Duration of one ETU at 212 kBit/s in [us].

§ PHHAL_HW_RC523_ETU_424

#define PHHAL_HW_RC523_ETU_424   2.4f

Duration of one ETU at 424 kBit/s in [us].

§ PHHAL_HW_RC523_ETU_848

#define PHHAL_HW_RC523_ETU_848   1.2f

Duration of one ETU at 848 kBit/s in [us].

§ PHHAL_HW_RC523_REQC_MIN_LEN

#define PHHAL_HW_RC523_REQC_MIN_LEN   19U

Minimum length of valid ReqC response when multiple reception is enable.

§ PHHAL_HW_RC523_FELICA_ADD_DELAY_US

#define PHHAL_HW_RC523_FELICA_ADD_DELAY_US   240U

Additional digital timeout delay for Felica.

§ PHHAL_HW_RC523_SERIALSPEED_7200

#define PHHAL_HW_RC523_SERIALSPEED_7200   0xFAU

7.200 kBit/s.

§ PHHAL_HW_RC523_SERIALSPEED_9600

#define PHHAL_HW_RC523_SERIALSPEED_9600   0xEBU

9.600 kBit/s.

§ PHHAL_HW_RC523_SERIALSPEED_14400

#define PHHAL_HW_RC523_SERIALSPEED_14400   0xDAU

14.400 kBit/s.

§ PHHAL_HW_RC523_SERIALSPEED_19200

#define PHHAL_HW_RC523_SERIALSPEED_19200   0xCBU

19.200 kBit/s.

§ PHHAL_HW_RC523_SERIALSPEED_38400

#define PHHAL_HW_RC523_SERIALSPEED_38400   0xABU

38.400 kBit/s.

§ PHHAL_HW_RC523_SERIALSPEED_57600

#define PHHAL_HW_RC523_SERIALSPEED_57600   0x9AU

57.500 kBit/s.

§ PHHAL_HW_RC523_SERIALSPEED_115200

#define PHHAL_HW_RC523_SERIALSPEED_115200   0x7AU

115.200 kBit/s.

§ PHHAL_HW_RC523_SERIALSPEED_128000

#define PHHAL_HW_RC523_SERIALSPEED_128000   0x74U

128.000 kBit/s.

§ PHHAL_HW_RC523_SERIALSPEED_230400

#define PHHAL_HW_RC523_SERIALSPEED_230400   0x5AU

230.400 kBit/s.

§ PHHAL_HW_RC523_SERIALSPEED_460800

#define PHHAL_HW_RC523_SERIALSPEED_460800   0x3AU

460.800 kBit/s.

§ PHHAL_HW_RC523_SERIALSPEED_921600

#define PHHAL_HW_RC523_SERIALSPEED_921600   0x1CU

921.600 kBit/s.

§ PHHAL_HW_RC523_SERIALSPEED_1228800

#define PHHAL_HW_RC523_SERIALSPEED_1228800   0x15U

1.228.800 kBit/s.

§ PHHAL_HW_RC523_MFC_AUTHA_CMD

#define PHHAL_HW_RC523_MFC_AUTHA_CMD   0x60U

MIFARE(R) Classic AUTHA command code.

§ PHHAL_HW_RC523_MFC_AUTHB_CMD

#define PHHAL_HW_RC523_MFC_AUTHB_CMD   0x61U

MIFARE(R) Classic AUTHB command code.

Function Documentation

§ phhalHw_Rc523_WriteFifo()

phStatus_t phhalHw_Rc523_WriteFifo ( phhalHw_Rc523_DataParams_t pDataParams,
uint8_t pData,
uint16_t  wLength,
uint16_t pBytesWritten 
)

Write Data to Fifo buffer.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and under-laying component.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[in]pDatainput data
[in]wLengthlength of input data
[out]pBytesWrittenNumber of written bytes

§ phhalHw_Rc523_ReadFifo()

phStatus_t phhalHw_Rc523_ReadFifo ( phhalHw_Rc523_DataParams_t pDataParams,
uint16_t  wBufSize,
uint8_t pData,
uint16_t pLength 
)

Read Data from Fifo buffer.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and under-laying component.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[in]wBufSizesize of output buffer
[out]pDataoutput data
[out]pLengthnumber of output data bytes

§ phhalHw_Rc523_FlushFifo()

phStatus_t phhalHw_Rc523_FlushFifo ( phhalHw_Rc523_DataParams_t pDataParams)

Clear Fifo buffer.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and under-laying component.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.

§ phhalHw_Rc523_WriteData()

phStatus_t phhalHw_Rc523_WriteData ( phhalHw_Rc523_DataParams_t pDataParams,
uint8_t  bAddress,
uint8_t pData,
uint16_t  wLength 
)

Write multiple values to a single register address.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and under-laying component.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[in]bAddressStart-Register Address
[in]pDataRegister Values; uint8_t[wLength]
[in]wLengthNumber of Values

§ phhalHw_Rc523_ReadData()

phStatus_t phhalHw_Rc523_ReadData ( phhalHw_Rc523_DataParams_t pDataParams,
uint8_t  bAddress,
uint16_t  wLength,
uint8_t pData 
)

Read multiple values from single register address.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and under-laying component.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[in]bAddressRegister Address
[in]wLengthNumber of Values
[out]pDataRegister Values; uint8_t[wLength]

§ phhalHw_Rc523_ExchangeTransmit()

phStatus_t phhalHw_Rc523_ExchangeTransmit ( phhalHw_Rc523_DataParams_t pDataParams,
uint8_t  bCmdCode,
uint8_t pTxBuffer,
uint16_t  wTxLength 
)

Transmit part of Exchange command.

See also
phhalHw_Exchange
Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and under-laying component.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[in]bCmdCodeCommand-Code of command.
[in]pTxBufferData to transmit.
[in]wTxLengthLength of data to transmit.

§ phhalHw_Rc523_ExchangeReceive()

phStatus_t phhalHw_Rc523_ExchangeReceive ( phhalHw_Rc523_DataParams_t pDataParams,
uint8_t **  ppRxBuffer,
uint16_t pRxLength 
)

Receive part of Exchange command.

See also
phhalHw_Exchange
Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and under-laying component.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[out]ppRxBufferPointer to received data.
[out]pRxLengthNumber of received data bytes.

§ phhalHw_Rc523_SetFdt()

phStatus_t phhalHw_Rc523_SetFdt ( phhalHw_Rc523_DataParams_t pDataParams,
uint16_t  wConfig,
uint16_t  wTimeout 
)

This function will calculate and store Timer Pre-scaler and Timer ReLoad values (Lower and Higher bytes).

For function phhalHw_Wait, this function will directly set register with calculated values. This function will calculate and store value for PHHAL_HW_CONFIG_TXWAIT_US or PHHAL_HW_CONFIG_TXWAIT_MS or PHHAL_HW_CONFIG_TIMEOUT_VALUE_US or PHHAL_HW_CONFIG_TIMEOUT_VALUE_MS.
wConfig can be one of:

Note: Frame Delay Time (FDT) is defined between the last transmitted bit and the first received bit.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and under-laying component.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[in]wConfigConfiguration Identifier.
[in]wTimeoutTime-out value.

§ phhalHw_Rc523_GetFdt()

phStatus_t phhalHw_Rc523_GetFdt ( phhalHw_Rc523_DataParams_t pDataParams,
phStatus_t  wExchangeStatus,
uint32_t pTime 
)

Retrieves the Frame Delay Time of the last command.

Note: Frame Delay Time is defined between the last transmitted bit and the first received bit.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and under-laying component.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[in]wExchangeStatusStatus code returned by exchange function.
[out]pTimeCalculated time in microseconds from timer contents.

§ phhalHw_Rc523_GetTxBuffer()

phStatus_t phhalHw_Rc523_GetTxBuffer ( phhalHw_Rc523_DataParams_t pDataParams,
uint8_t  bIsExchange,
uint8_t **  pTxBuffer,
uint16_t pTxBufferLen,
uint16_t pTxBufferSize 
)

Returns the TxBuffer pointer, length and size.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[in]bIsExchangeWhether this is for Exchange (PH_ON) or not (PH_OFF).
[out]pTxBufferPointer to the TxBuffer.
[out]pTxBufferLenNumber of bytes already in the TxBuffer.
[out]pTxBufferSizeSize of the TxBuffer.

§ phhalHw_Rc523_GetRxBuffer()

phStatus_t phhalHw_Rc523_GetRxBuffer ( phhalHw_Rc523_DataParams_t pDataParams,
uint8_t  bIsExchange,
uint8_t **  pRxBuffer,
uint16_t pRxBufferLen,
uint16_t pRxBufferSize 
)

Returns the RxBuffer pointer, length and size.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[in]bIsExchangeWhether this is for Exchange (PH_ON) or not (PH_OFF).
[out]pRxBufferPointer to the RxBuffer.
[out]pRxBufferLenNumber of bytes already in the RxBuffer.
[out]pRxBufferSizeSize of the RxBuffer.

§ phhalHw_Rc523_WaitIrq()

phStatus_t phhalHw_Rc523_WaitIrq ( phhalHw_Rc523_DataParams_t pDataParams,
uint8_t  bIrq0WaitFor,
uint8_t  bIrq1WaitFor,
uint8_t pIrq0Reg,
uint8_t pIrq1Reg 
)

Wait until one of the given interrupts occurs.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and under-laying component.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[in]bIrq0WaitForBitmask of interrupts in CommIrq register to wait for.
[in]bIrq1WaitForBitmask of interrupts in DivIrq register to wait for.
[out]pIrq0RegContents of CommIrq register.
[out]pIrq1RegContents of DivIrq register.

§ phhalHw_Rc523_LoadTimeout()

phStatus_t phhalHw_Rc523_LoadTimeout ( phhalHw_Rc523_DataParams_t pDataParams)

Configure registers for Frame Delay Time (Timeout) values.

Registers value are calculated and stored by function phhalHw_Rc523_SetFdt.

Note: Frame Delay Time is defined between the last transmitted bit and the first received bit.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and under-laying component.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.

§ phhalHw_Rc523_StartTxWaitTimer()

phStatus_t phhalHw_Rc523_StartTxWaitTimer ( phhalHw_Rc523_DataParams_t pDataParams)

Configure registers for TxWait and start timer.

Registers value are calculated and stored by function phhalHw_Rc523_SetFdt.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and under-laying component.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.

§ phhalHw_Rc523_CreateRespFrame()

void phhalHw_Rc523_CreateRespFrame ( uint8_t bInBuff,
uint8_t  bDataPos,
uint8_t bOutBuff 
)

This function will return the answer to ReqC in 32 byte multi slot frame format.

Size of output frame is PHHAL_HW_RESP_FRAME_SIZE byte.

Note: This function is only valid when multiple reception PHHAL_HW_CONFIG_RXMULTIPLE is enabled.

Parameters
[in]bInBuffPointer to Rx buffer.
[in]bDataPosposition of card response in Rxbuffer.
[out]bOutBuffPointer to buffer which store frame of PHHAL_HW_RESP_FRAME_SIZE size.

§ phhalHw_Rc523_FrameRxMultiplePkt()

phStatus_t phhalHw_Rc523_FrameRxMultiplePkt ( phhalHw_Rc523_DataParams_t pDataParams)

Frame packet which contains a series of ReqC responses(if multiple response received) in multi-slot response format and update Hal Rx buffer.

This function will use function phhalHw_Rc523_CreateRespFrame to frame each card responses multi-slot frame format.

Note: This function is only valid when multiple reception PHHAL_HW_CONFIG_RXMULTIPLE is enabled.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and under-laying component.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.

§ phhalHw_Rc523_CheckForEmdError()

phStatus_t phhalHw_Rc523_CheckForEmdError ( phhalHw_Rc523_DataParams_t pDataParams,
uint8_t  bIrq0WaitFor,
uint8_t  bIrq1WaitFor,
uint8_t pIrq0Reg,
uint8_t pIrq1Reg 
)

EMD error handling function on PN512.

Return values
OtherDepending on implementation and under-laying component.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[in]bIrq0WaitForBitmask of interrupts in Irq0 register to wait for.
[in]bIrq1WaitForBitmask of interrupts in Irq1 register to wait for.
[out]pIrq0RegContains Register Read Value.
[out]pIrq1RegContains Register Read Value.

§ phhalHw_Rc523_ReStartRx()

phStatus_t phhalHw_Rc523_ReStartRx ( phhalHw_Rc523_DataParams_t pDataParams)

Restart Receiver function on PN512.

Return values
OtherDepending on implementation and under-laying component.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.

§ phhalHw_Rc523_GetMultiReg()

phStatus_t phhalHw_Rc523_GetMultiReg ( phhalHw_Rc523_DataParams_t pDataParams,
uint8_t pData 
)

Get MultiReg function on PN512.

Return values
OtherDepending on implementation and under-laying component.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[out]pDataPointer to buffer which store register values.

§ phhalHw_Rc523_GetError()

phStatus_t phhalHw_Rc523_GetError ( phhalHw_Rc523_DataParams_t pDataParams)

Get error from ErrorReg of PN512.

Return values
.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.