User manual

NXP Semiconductors
UM10663
NXP Reader Library User Manual
UM10663
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2013. All rights reserved.
User Manual
COMPANY PUBLIC
Rev. 1.224 July 2013
257412
13 of 47
wKeyNo
exceeds half of maximum possible number of keys in
the EEPROM
PH_ERR_IO_TIMEOUT
- Authentication command itself did not succeeded while timeout from
timer1 terminated.
PH_ERR_SUCCESS
- operation successful.
Other: depending on implementation and underlaying component.
2.1.7 Receive
- phhalHw_Rc663_Cmd_Receive()
This function handles receiver, then waits for eventually coming data. There are many
data related errors that can occur during reception: framing, CRC, buffer overflow,
protocol, integrity, collision error. Weather successful frame reception or any among
many possible errors occur, they are used as return values, so developer can further
manage particular situation himself. Receiving also terminates as soon as number of
received data overflows FIFO WaterLevel. Waterlevel is set on default size FIFO-1 bytes,
so abort from this interrupt source should not occur. If necessary, use
WriteRegister(pDataParams, PHHAL_HW_RC663_REG_WATERLEVEL, customWaterlevelValue)
to set
the Waterlevel on custom value.
phStatus_t phhalHw_Rc663_Cmd_Receive(
phhalHw_Rc663_DataParams_t * DataParams, [In]
uint16_t wOption, [In]
uint8_t ** ppRxBuffer, [Out]
uint16_t * pRxLength ); [Out]
*pDataParams: pointer the HAL layer data parameter structure.
pDataParams->bRfResetAfterTo == PH_ON
: provokes RF field reset, after unsuccessful
reception due to timeout. Although this is just software parameter (no register related), it
is recommended to set this option by
phhalHw_SetConfig(pDataparams,
PHHAL_HW_CONFIG_RFRESET_ON_TIMEOUT, PH_ON)
function (see section 2.2.3).
wOption:
PHHAL_HW_RC663_OPTION_RXTX_TIMER_START
should be passed here to prevent
software from freezing while waiting for received data for a long time. This option
employs both T0 and T1 timers.
**ppRxBuffer: the pointer to byte where function writes received data.
*pRxLength: is pointer to the number of received data bytes.
returnValues:
PH_ERR_IO_TIMEOUT
no coming data detected and while timeout from timer 1 terminated.
PH_ERR_BUFFER_OVERFLOW
- Data is written into the FIFO when it is already full.
PH_ERR_READ_WRITE_ERROR
- Data was written into the FIFO, during a transmission of a
possible CRC, during "RxWait", "Wait for data" or "Receiving" state, or during an
authentication command.
PH_ERR_FRAMING_ERROR
- A valid SOF was received, but afterwards less than 4 data bits
were
received.
PH_ERR_COLLISION_ERROR
A collision has occurred. Software routine retrieves valid bits of last
byte.
PH_ERR_PROTOCOL_ERROR
A protocol error has occurred. When a protocol error occurs the last
received data byte is not written into the FIFO.