Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
NFC-V
[RFAL-AL]
RFAL NFC-V Module. More...
Data Structures | |
| struct | rfalNfcvInventoryRes |
| struct | rfalNfcvListenDevice |
Enumerations | |
| enum | { RFAL_NFCV_REQ_FLAG_DEFAULT = 0x02, RFAL_NFCV_REQ_FLAG_SUB_CARRIER = 0x01, RFAL_NFCV_REQ_FLAG_DATA_RATE = 0x02, RFAL_NFCV_REQ_FLAG_INVENTORY = 0x04, RFAL_NFCV_REQ_FLAG_PROTOCOL_EXT = 0x08, RFAL_NFCV_REQ_FLAG_SELECT = 0x10, RFAL_NFCV_REQ_FLAG_ADDRESS = 0x20, RFAL_NFCV_REQ_FLAG_OPTION = 0x40, RFAL_NFCV_REQ_FLAG_RFU = 0x80, RFAL_NFCV_REQ_FLAG_AFI = 0x10, RFAL_NFCV_REQ_FLAG_NB_SLOTS = 0x20 } |
| enum | { RFAL_NFCV_RES_FLAG_ERROR = 0x01, RFAL_NFCV_RES_FLAG_RFU1 = 0x02, RFAL_NFCV_RES_FLAG_RFU2 = 0x04, RFAL_NFCV_RES_FLAG_EXTENSION = 0x08, RFAL_NFCV_RES_FLAG_RFU3 = 0x10, RFAL_NFCV_RES_FLAG_RFU4 = 0x20, RFAL_NFCV_RES_FLAG_RFU5 = 0x40, RFAL_NFCV_RES_FLAG_RFU6 = 0x80 } |
| enum | { RFAL_NFCV_ERROR_CMD_NOT_SUPPORTED = 0x01, RFAL_NFCV_ERROR_CMD_NOT_RECOGNIZED = 0x02, RFAL_NFCV_ERROR_OPTION_NOT_SUPPORTED = 0x03, RFAL_NFCV_ERROR_UNKNOWN = 0x0F, RFAL_NFCV_ERROR_BLOCK_NOT_AVALIABLE = 0x10, RFAL_NFCV_ERROR_BLOCK_ALREDY_LOCKED = 0x11, RFAL_NFCV_ERROR_BLOCK_LOCKED = 0x12, RFAL_NFCV_ERROR_WRITE_FAILED = 0x13, RFAL_NFCV_ERROR_BLOCK_FAILED = 0x14 } |
| enum | { RFAL_NFCF_CMD_INVENTORY = 0x01, RFAL_NFCF_CMD_SLPV = 0x02, RFAL_NFCF_CMD_READ_SINGLE_BLOCK = 0x20, RFAL_NFCF_CMD_WRITE_SINGLE_BLOCK = 0x21, RFAL_NFCF_CMD_LOCK_BLOCK = 0x22, RFAL_NFCF_CMD_READ_MULTIPLE_BLOCKS = 0x23, RFAL_NFCF_CMD_WRITE_MULTIPLE_BLOCKS = 0x24, RFAL_NFCF_CMD_SELECT = 0x25, RFAL_NFCF_CMD_RESET_TO_READY = 0x26, RFAL_NFCF_CMD_GET_SYS_INFO = 0x2B, RFAL_NFCF_CMD_EXTENDED_GET_SYS_INFO = 0x2B } |
| enum | rfalNfcvNumSlots { RFAL_NFCV_NUM_SLOTS_1 = 0x20, RFAL_NFCV_NUM_SLOTS_16 = 0x00 } |
Functions | |
| ReturnCode | rfalNfcvPollerInitialize (SPI *mspiChannel, ST25R3911 *mST25, DigitalOut *gpio_cs, InterruptIn *IRQ, DigitalOut *fieldLED_01, DigitalOut *fieldLED_02, DigitalOut *fieldLED_03, DigitalOut *fieldLED_04, DigitalOut *fieldLED_05, DigitalOut *fieldLED_06) |
| Initialize NFC-V Poller mode. | |
| ReturnCode | rfalNfcvPollerCheckPresence (rfalNfcvInventoryRes *invRes, SPI *mspiChannel, ST25R3911 *mST25, DigitalOut *gpio_cs, InterruptIn *IRQ, DigitalOut *fieldLED_01, DigitalOut *fieldLED_02, DigitalOut *fieldLED_03, DigitalOut *fieldLED_04, DigitalOut *fieldLED_05, DigitalOut *fieldLED_06) |
| NFC-V Poller Check Presence. | |
| ReturnCode | rfalNfcvPollerInventory (rfalNfcvNumSlots nSlots, uint8_t maskLen, uint8_t *maskVal, rfalNfcvInventoryRes *invRes, uint16_t *rcvdLen, SPI *mspiChannel, ST25R3911 *mST25, DigitalOut *gpio_cs, InterruptIn *IRQ, DigitalOut *fieldLED_01, DigitalOut *fieldLED_02, DigitalOut *fieldLED_03, DigitalOut *fieldLED_04, DigitalOut *fieldLED_05, DigitalOut *fieldLED_06) |
| NFC-F Poller Poll. | |
| ReturnCode | rfalNfcvPollerCollisionResolution (uint8_t devLimit, rfalNfcvListenDevice *nfcvDevList, uint8_t *devCnt, SPI *mspiChannel, ST25R3911 *mST25, DigitalOut *gpio_cs, InterruptIn *IRQ, DigitalOut *fieldLED_01, DigitalOut *fieldLED_02, DigitalOut *fieldLED_03, DigitalOut *fieldLED_04, DigitalOut *fieldLED_05, DigitalOut *fieldLED_06) |
| NFC-V Poller Full Collision Resolution. | |
| ReturnCode | rfalNfvPollerSleep (uint8_t flags, uint8_t *uid, SPI *mspiChannel, ST25R3911 *mST25, DigitalOut *gpio_cs, InterruptIn *IRQ, DigitalOut *fieldLED_01, DigitalOut *fieldLED_02, DigitalOut *fieldLED_03, DigitalOut *fieldLED_04, DigitalOut *fieldLED_05, DigitalOut *fieldLED_06) |
| NFC-V Poller Sleep. | |
| ReturnCode | rfalNfvPollerSelect (uint8_t flags, uint8_t *uid) |
| NFC-V Poller Select. | |
| ReturnCode | rfalNfvPollerReadSingleBlock (uint8_t flags, uint8_t *uid, uint8_t blockNum, uint8_t *rxBuf, uint16_t rxBufLen, uint16_t *rcvLen) |
| NFC-V Poller Read Single Block. | |
| ReturnCode | rfalNfvPollerWriteSingleBlock (uint8_t flags, uint8_t *uid, uint8_t blockNum, uint8_t *wrData, uint8_t blockLen) |
| NFC-V Poller Write Single Block. | |
| ReturnCode | rfalNfvPollerReadMultipleBlocks (uint8_t flags, uint8_t *uid, uint8_t firstBlockNum, uint8_t numOfBlocks, uint8_t *rxBuf, uint16_t rxBufLen, uint16_t *rcvLen, SPI *mspiChannel, ST25R3911 *mST25, DigitalOut *gpio_cs, InterruptIn *IRQ, DigitalOut *fieldLED_01, DigitalOut *fieldLED_02, DigitalOut *fieldLED_03, DigitalOut *fieldLED_04, DigitalOut *fieldLED_05, DigitalOut *fieldLED_06) |
| NFC-V Poller Read Multiple Blocks. | |
Detailed Description
RFAL NFC-V Module.
Enumeration Type Documentation
| anonymous enum |
NFC-V RequestFlags ISO15693 2000 7.3.1
- Enumerator:
Definition at line 75 of file rfal_nfcv.h.
| anonymous enum |
NFC-V Response Flags ISO15693 2000 7.4.1
- Enumerator:
Definition at line 90 of file rfal_nfcv.h.
| anonymous enum |
NFC-V Error code ISO15693 2000 7.4.2
- Enumerator:
Definition at line 102 of file rfal_nfcv.h.
| anonymous enum |
NFC-V command set ISO15693 2000 9.1
- Enumerator:
Definition at line 116 of file rfal_nfcv.h.
| enum rfalNfcvNumSlots |
NFC-V Number of slots Digital 2.0 9.6.1
Definition at line 145 of file rfal_nfcv.h.
Function Documentation
| ReturnCode rfalNfcvPollerCheckPresence | ( | rfalNfcvInventoryRes * | invRes, |
| SPI * | mspiChannel, | ||
| ST25R3911 * | mST25, | ||
| DigitalOut * | gpio_cs, | ||
| InterruptIn * | IRQ, | ||
| DigitalOut * | fieldLED_01, | ||
| DigitalOut * | fieldLED_02, | ||
| DigitalOut * | fieldLED_03, | ||
| DigitalOut * | fieldLED_04, | ||
| DigitalOut * | fieldLED_05, | ||
| DigitalOut * | fieldLED_06 | ||
| ) |
NFC-V Poller Check Presence.
This method checks if a NFC-V Listen device (VICC) is present on the field by sending an Inventory (INVENTORY_REQ)
- Parameters:
-
[out] invRes : If received, the INVENTORY_RES
- Returns:
- ERR_WRONG_STATE : RFAL not initialized or incorrect mode
- ERR_PARAM : Invalid parameters
- ERR_IO : Generic internal error
- ERR_TIMEOUT : Timeout error, no listener device detectedd
- ERR_NONE : No error, one or more device in the field
Definition at line 216 of file rfal_nfcv.cpp.
| ReturnCode rfalNfcvPollerCollisionResolution | ( | uint8_t | devLimit, |
| rfalNfcvListenDevice * | nfcvDevList, | ||
| uint8_t * | devCnt, | ||
| SPI * | mspiChannel, | ||
| ST25R3911 * | mST25, | ||
| DigitalOut * | gpio_cs, | ||
| InterruptIn * | IRQ, | ||
| DigitalOut * | fieldLED_01, | ||
| DigitalOut * | fieldLED_02, | ||
| DigitalOut * | fieldLED_03, | ||
| DigitalOut * | fieldLED_04, | ||
| DigitalOut * | fieldLED_05, | ||
| DigitalOut * | fieldLED_06 | ||
| ) |
NFC-V Poller Full Collision Resolution.
Performs a full Collision resolution as defined in Activity 2.0 9.3.7 Once done, the devCnt will indicate how many (if any) devices have been identified and their details are contained on nfcvDevList
- Parameters:
-
[in] devLimit : device limit value, and size nfcaDevList [out] nfcvDevList : NFC-v listener devices list [out] devCnt : Devices found counter [out] colPending : It indicates if collsion(s) are still pending
- Returns:
- ERR_WRONG_STATE : RFAL not initialized or mode not set
- ERR_PARAM : Invalid parameters
- ERR_IO : Generic internal error
- ERR_NONE : No error
Definition at line 269 of file rfal_nfcv.cpp.
| ReturnCode rfalNfcvPollerInitialize | ( | SPI * | mspiChannel, |
| ST25R3911 * | mST25, | ||
| DigitalOut * | gpio_cs, | ||
| InterruptIn * | IRQ, | ||
| DigitalOut * | fieldLED_01, | ||
| DigitalOut * | fieldLED_02, | ||
| DigitalOut * | fieldLED_03, | ||
| DigitalOut * | fieldLED_04, | ||
| DigitalOut * | fieldLED_05, | ||
| DigitalOut * | fieldLED_06 | ||
| ) |
Initialize NFC-V Poller mode.
This methods configures RFAL RF layer to perform as a NFC-F Poller/RW (ISO15693) including all default timings
- Returns:
- ERR_WRONG_STATE : RFAL not initialized or mode not set
- ERR_PARAM : Incorrect bitrate
- ERR_NONE : No error
Definition at line 201 of file rfal_nfcv.cpp.
| ReturnCode rfalNfcvPollerInventory | ( | rfalNfcvNumSlots | nSlots, |
| uint8_t | maskLen, | ||
| uint8_t * | maskVal, | ||
| rfalNfcvInventoryRes * | invRes, | ||
| uint16_t * | rcvdLen, | ||
| SPI * | mspiChannel, | ||
| ST25R3911 * | mST25, | ||
| DigitalOut * | gpio_cs, | ||
| InterruptIn * | IRQ, | ||
| DigitalOut * | fieldLED_01, | ||
| DigitalOut * | fieldLED_02, | ||
| DigitalOut * | fieldLED_03, | ||
| DigitalOut * | fieldLED_04, | ||
| DigitalOut * | fieldLED_05, | ||
| DigitalOut * | fieldLED_06 | ||
| ) |
NFC-F Poller Poll.
This function sends to all VICCs in field the INVENTORY command with the given number of slots
If more than one slot is used the following EOF need to be handled by the caller using rfalISO15693TransceiveAnticollisionEOF()
- Parameters:
-
[in] nSlots : Number of Slots to be sent (1 or 16) [in] maskLen : Number bits on the Mask value [in] maskVal : location of the Mask value [out] invRes : location to place the INVENTORY_RES [out] rcvdLen : number of bits received (without collision)
- Returns:
- ERR_WRONG_STATE : RFAL not initialized or incorrect mode
- ERR_PARAM : Invalid parameters
- ERR_IO : Generic internal error
- ERR_RF_COLLISION : Collision detected
- ERR_CRC : CRC error detected
- ERR_PROTO : Protocol error detected
- ERR_NONE : No error
Definition at line 233 of file rfal_nfcv.cpp.
| ReturnCode rfalNfvPollerReadMultipleBlocks | ( | uint8_t | flags, |
| uint8_t * | uid, | ||
| uint8_t | firstBlockNum, | ||
| uint8_t | numOfBlocks, | ||
| uint8_t * | rxBuf, | ||
| uint16_t | rxBufLen, | ||
| uint16_t * | rcvLen, | ||
| SPI * | mspiChannel, | ||
| ST25R3911 * | mST25, | ||
| DigitalOut * | gpio_cs, | ||
| InterruptIn * | IRQ, | ||
| DigitalOut * | fieldLED_01, | ||
| DigitalOut * | fieldLED_02, | ||
| DigitalOut * | fieldLED_03, | ||
| DigitalOut * | fieldLED_04, | ||
| DigitalOut * | fieldLED_05, | ||
| DigitalOut * | fieldLED_06 | ||
| ) |
NFC-V Poller Read Multiple Blocks.
Reads Multiple Blocks from a device (VICC)
- Parameters:
-
[in] flags : Flags to be used: Sub-carrier; Data_rate; Option for NFC-Forum use: RFAL_NFCV_REQ_FLAG_DEFAULT [in] uid : UID of the device to be put to be read if not provided Select mode will be used [in] firstBlockNum : first block to be read [out] rxBuf : buffer to store response (also with RES_FLAGS) [in] rxBufLen : length of rxBuf [out] rcvLen : number of bytes received
- Returns:
- ERR_WRONG_STATE : RFAL not initialized or incorrect mode
- ERR_PARAM : Invalid parameters
- ERR_IO : Generic internal error
- ERR_CRC : CRC error detected
- ERR_FRAMING : Framing error detected
- ERR_PROTO : Protocol error detected
- ERR_TIMEOUT : Timeout error
- ERR_NONE : No error
| ReturnCode rfalNfvPollerReadSingleBlock | ( | uint8_t | flags, |
| uint8_t * | uid, | ||
| uint8_t | blockNum, | ||
| uint8_t * | rxBuf, | ||
| uint16_t | rxBufLen, | ||
| uint16_t * | rcvLen | ||
| ) |
NFC-V Poller Read Single Block.
Reads a Single Block from a device (VICC)
- Parameters:
-
[in] flags : Flags to be used: Sub-carrier; Data_rate; Option for NFC-Forum use: RFAL_NFCV_REQ_FLAG_DEFAULT [in] uid : UID of the device to be put to be read if not provided Select mode will be used [in] blockNum : Number of the block to read [out] rxBuf : buffer to store response (also with RES_FLAGS) [in] rxBufLen : length of rxBuf [out] rcvLen : number of bytes received
- Returns:
- ERR_WRONG_STATE : RFAL not initialized or incorrect mode
- ERR_PARAM : Invalid parameters
- ERR_IO : Generic internal error
- ERR_CRC : CRC error detected
- ERR_FRAMING : Framing error detected
- ERR_PROTO : Protocol error detected
- ERR_TIMEOUT : Timeout error
- ERR_NONE : No error
| ReturnCode rfalNfvPollerSelect | ( | uint8_t | flags, |
| uint8_t * | uid | ||
| ) |
NFC-V Poller Select.
Selects a device (VICC) by its UID
- Parameters:
-
[in] flags : Flags to be used: Sub-carrier; Data_rate; Option for NFC-Forum use: RFAL_NFCV_REQ_FLAG_DEFAULT [in] uid : UID of the device to be put to be Selected
- Returns:
- ERR_WRONG_STATE : RFAL not initialized or incorrect mode
- ERR_PARAM : Invalid parameters
- ERR_IO : Generic internal error
- ERR_CRC : CRC error detected
- ERR_FRAMING : Framing error detected
- ERR_PROTO : Protocol error detected
- ERR_TIMEOUT : Timeout error
- ERR_NONE : No error
| ReturnCode rfalNfvPollerSleep | ( | uint8_t | flags, |
| uint8_t * | uid, | ||
| SPI * | mspiChannel, | ||
| ST25R3911 * | mST25, | ||
| DigitalOut * | gpio_cs, | ||
| InterruptIn * | IRQ, | ||
| DigitalOut * | fieldLED_01, | ||
| DigitalOut * | fieldLED_02, | ||
| DigitalOut * | fieldLED_03, | ||
| DigitalOut * | fieldLED_04, | ||
| DigitalOut * | fieldLED_05, | ||
| DigitalOut * | fieldLED_06 | ||
| ) |
NFC-V Poller Sleep.
This function is used to send the SLPV_REQ (Stay Quiet) command to put the VICC with the given UID to state QUIET so that they do not reply to more Inventory
- Parameters:
-
[in] uid : UID of the device to be put to Sleep
- Returns:
- ERR_WRONG_STATE : RFAL not initialized or incorrect mode
- ERR_PARAM : Invalid parameters
- ERR_IO : Generic internal error
- ERR_NONE : No error
Definition at line 395 of file rfal_nfcv.cpp.
| ReturnCode rfalNfvPollerWriteSingleBlock | ( | uint8_t | flags, |
| uint8_t * | uid, | ||
| uint8_t | blockNum, | ||
| uint8_t * | wrData, | ||
| uint8_t | blockLen | ||
| ) |
NFC-V Poller Write Single Block.
Writes a Single Block from a device (VICC)
- Parameters:
-
[in] flags : Flags to be used: Sub-carrier; Data_rate; Option for NFC-Forum use: RFAL_NFCV_REQ_FLAG_DEFAULT [in] uid : UID of the device to be put to be read if not provided Select mode will be used [in] blockNum : Number of the block to read [in] wrData : data to be written on the given block [in] blockLen : number of bytes of a block
- Returns:
- ERR_WRONG_STATE : RFAL not initialized or incorrect mode
- ERR_PARAM : Invalid parameters
- ERR_IO : Generic internal error
- ERR_CRC : CRC error detected
- ERR_FRAMING : Framing error detected
- ERR_PROTO : Protocol error detected
- ERR_TIMEOUT : Timeout error
- ERR_NONE : No error
Generated on Sat Jul 16 2022 13:00:53 by
1.7.2