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-B
[RFAL-AL]
RFAL NFC-B Module. More...
Data Structures | |
struct | rfalNfcbSensbResAppData |
struct | rfalNfcbSensbResProtocolInfo |
struct | rfalNfcbSensbRes |
struct | rfalNfcbListenDevice |
Enumerations | |
enum | rfalNfcbSensCmd { RFAL_NFCB_SENS_CMD_ALLB_REQ = 0x08, RFAL_NFCB_SENS_CMD_SENSB_REQ = 0x00 } |
enum | rfalNfcbSlots { RFAL_NFCB_SLOT_NUM_1 = 0, RFAL_NFCB_SLOT_NUM_2 = 1, RFAL_NFCB_SLOT_NUM_4 = 2, RFAL_NFCB_SLOT_NUM_8 = 3, RFAL_NFCB_SLOT_NUM_16 = 4 } |
Functions | |
ReturnCode | rfalNfcbPollerInitialize (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-B Poller mode. | |
ReturnCode | rfalNfcbPollerInitializeWithParams (uint8_t AFI, uint8_t PARAM, 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) |
Set NFC-B Poller parameters. | |
ReturnCode | rfalNfcbPollerCheckPresence (rfalNfcbSensCmd cmd, rfalNfcbSlots slots, rfalNfcbSensbRes *sensbRes, uint8_t *sensbResLen, 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-B Poller Check Presence. | |
ReturnCode | rfalNfcbPollerSleep (uint8_t *nfcid0, 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-B Poller Sleep. | |
ReturnCode | rfalNfcbPollerSlotMarker (uint8_t slotCode, rfalNfcbSensbRes *sensbRes, uint8_t *sensbResLen, 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-B Poller Slot Marker. | |
ReturnCode | rfalNfcbPollerTechnologyDetection (rfalComplianceMode compMode, rfalNfcbSensbRes *sensbRes, uint8_t *sensbResLen, 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-B Technology Detection. | |
ReturnCode | rfalNfcbPollerCollisionResolution (rfalComplianceMode compMode, uint8_t devLimit, rfalNfcbListenDevice *nfcbDevList, 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-B Poller Collision Resolution. | |
ReturnCode | rfalNfcbPollerCollisionResolutionSlotted (rfalComplianceMode compMode, uint8_t devLimit, rfalNfcbSlots initSlots, rfalNfcbSlots endSlots, rfalNfcbListenDevice *nfcbDevList, uint8_t *devCnt, bool *colPending, 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-B Poller Collision Resolution Slotted. | |
uint32_t | rfalNfcbTR2ToFDT (uint8_t tr2Code) |
NFC-B TR2 code to FDT. |
Detailed Description
RFAL NFC-B Module.
Enumeration Type Documentation
enum rfalNfcbSensCmd |
SENSB_REQ and ALLB_REQ param Digital 1.1 7.6.1
- Enumerator:
RFAL_NFCB_SENS_CMD_ALLB_REQ ALLB_REQ (WUPB)
RFAL_NFCB_SENS_CMD_SENSB_REQ SENSB_REQ (REQB)
Definition at line 122 of file rfal_nfcb.h.
enum rfalNfcbSlots |
Number of Slots (NI) codes used for NFC-B anti collision Digital 1.1 Table 26
- Enumerator:
RFAL_NFCB_SLOT_NUM_1 N=0 : 1 slot
RFAL_NFCB_SLOT_NUM_2 N=1 : 2 slots
RFAL_NFCB_SLOT_NUM_4 N=2 : 4 slots
RFAL_NFCB_SLOT_NUM_8 N=3 : 8 slots
RFAL_NFCB_SLOT_NUM_16 N=4 : 16 slots
Definition at line 130 of file rfal_nfcb.h.
Function Documentation
ReturnCode rfalNfcbPollerCheckPresence | ( | rfalNfcbSensCmd | cmd, |
rfalNfcbSlots | slots, | ||
rfalNfcbSensbRes * | sensbRes, | ||
uint8_t * | sensbResLen, | ||
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-B Poller Check Presence.
This method checks if a NFC-B Listen device (PICC) is present on the field by sending an ALLB_REQ (WUPB) or SENSB_REQ (REQB)
- Parameters:
-
[in] cmd : Indicate if to send an ALL_REQ or a SENS_REQ [in] slots : The number of slots to be announced [out] sensbRes : If received, the SENSB_RES [out] sensbResLen : If received, the SENSB_RES length
- 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 detected
- ERR_RF_COLLISION : Collision detected one or more device in the field
- ERR_PAR : Parity error detected, one or more device in the field
- ERR_CRC : CRC error detected, one or more device in the field
- ERR_FRAMING : Framing error detected, one or more device in the field
- ERR_PROTO : Protocol error detected, invalid SENSB_RES received
- ERR_NONE : No error, SENSB_RES received
Definition at line 218 of file rfal_nfcb.cpp.
ReturnCode rfalNfcbPollerCollisionResolution | ( | rfalComplianceMode | compMode, |
uint8_t | devLimit, | ||
rfalNfcbListenDevice * | nfcbDevList, | ||
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-B Poller Collision Resolution.
NFC-B Collision resolution Listener device/card (PICC) as defined in Activity 1.1 9.3.5
This function is used to perform collision resolution for detection in case of multiple NFC Forum Devices with Technology B detected. Target with valid SENSB_RES will be stored in devInfo and nfcbDevCount incremented.
- Parameters:
-
[in] compMode : compliance mode to be performed [in] devLimit : device limit value, and size nfcbDevList [out] nfcbDevList : NFC-B listener device info [out] devCnt : devices found counter
- Returns:
- ERR_WRONG_STATE : RFAL not initialized or mode not set
- ERR_PARAM : Invalid parameters
- ERR_IO : Generic internal error
- ERR_PROTO : Protocol error detected
- ERR_NONE : No error
Definition at line 333 of file rfal_nfcb.cpp.
ReturnCode rfalNfcbPollerCollisionResolutionSlotted | ( | rfalComplianceMode | compMode, |
uint8_t | devLimit, | ||
rfalNfcbSlots | initSlots, | ||
rfalNfcbSlots | endSlots, | ||
rfalNfcbListenDevice * | nfcbDevList, | ||
uint8_t * | devCnt, | ||
bool * | colPending, | ||
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-B Poller Collision Resolution Slotted.
NFC-B Collision resolution Listener device/card (PICC). The sequence can be configured to be according to NFC Forum Activity 1.1 9.3.5, ISO10373 or EMVCo
This function is used to perform collision resolution for detection in case of multiple NFC Forum Devices with Technology B are detected. Target with valid SENSB_RES will be stored in devInfo and nfcbDevCount incremented.
This method provides the means to perform a collision resolution loop with specific initial and end number of slots. This allows to user to start the loop already with greater number of slots, and or limit the end number of slots. At the end a flag indicating whether there were collisions pending is returned.
If RFAL_COMPLIANCE_MODE_ISO is used initSlots must be set to RFAL_NFCB_SLOT_NUM_1
- Parameters:
-
[in] compMode : compliance mode to be performed [in] devLimit : device limit value, and size nfcbDevList [in] initSlots : number of slots to open initially [in] endSlots : number of slots when to stop collision resolution [out] nfcbDevList : NFC-B listener device info [out] devCnt : devices found counter [out] colPending : flag indicating whether collision are still pending
- Returns:
- ERR_WRONG_STATE : RFAL not initialized or mode not set
- ERR_PARAM : Invalid parameters
- ERR_IO : Generic internal error
- ERR_PROTO : Protocol error detected
- ERR_NONE : No error
Definition at line 341 of file rfal_nfcb.cpp.
ReturnCode rfalNfcbPollerInitialize | ( | 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-B Poller mode.
This methods configures RFAL RF layer to perform as a NFC-B Poller/RW (ISO14443B PCD) including all default timings
It sets NFC-B parameters (AFI, PARAM) to default values
- Returns:
- ERR_WRONG_STATE : RFAL not initialized or mode not set
- ERR_NONE : No error
Definition at line 186 of file rfal_nfcb.cpp.
ReturnCode rfalNfcbPollerInitializeWithParams | ( | uint8_t | AFI, |
uint8_t | PARAM, | ||
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 | ||
) |
Set NFC-B Poller parameters.
This methods configures RFAL RF layer to perform as a NFCA Poller/RW (ISO14443A PCD) including all default timings
Additionally configures NFC-B specific parameters to be used on the following communications
- Parameters:
-
[in] AFI : Application Family Identifier to be used [in] PARAM : PARAM to be used, it announces whether Advanced Features or Extended SENSB_RES is supported
- Returns:
- ERR_WRONG_STATE : RFAL not initialized or mode not set
- ERR_NONE : No error
Definition at line 204 of file rfal_nfcb.cpp.
ReturnCode rfalNfcbPollerSleep | ( | uint8_t * | nfcid0, |
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-B Poller Sleep.
This function is used to send the SLPB_REQ (HLTB) command to put the PICC with the given NFCID0 to state HALT so that they do not reply to further SENSB_REQ commands (only to ALLB_REQ)
- Parameters:
-
[in] nfcid0 : NFCID 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 262 of file rfal_nfcb.cpp.
ReturnCode rfalNfcbPollerSlotMarker | ( | uint8_t | slotCode, |
rfalNfcbSensbRes * | sensbRes, | ||
uint8_t * | sensbResLen, | ||
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-B Poller Slot Marker.
This method selects a NFC-B Slot marker frame
- Parameters:
-
[in] slotCode : Slot Code [1-15] [out] sensbRes : If received, the SENSB_RES [out] sensbResLen : If received, the SENSB_RES length
- Returns:
- ERR_WRONG_STATE : RFAL not initialized or incorrect mode
- ERR_PARAM : Invalid parameters
- ERR_IO : Generic internal error
- ERR_TIMEOUT : Timeout error
- ERR_PAR : Parity error detected
- ERR_CRC : CRC error detected
- ERR_FRAMING : Framing error detected
- ERR_PROTO : Protocol error detected
- ERR_NONE : No error, SEL_RES received
Definition at line 290 of file rfal_nfcb.cpp.
ReturnCode rfalNfcbPollerTechnologyDetection | ( | rfalComplianceMode | compMode, |
rfalNfcbSensbRes * | sensbRes, | ||
uint8_t * | sensbResLen, | ||
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-B Technology Detection.
This method performs NFC-B Technology Detection as defined in the spec given in the compliance mode
- Parameters:
-
[in] compMode : compliance mode to be performed [out] sensbRes : location to store the SENSB_RES, if received [out] sensbResLen : length of the SENSB_RES, if received
- Returns:
- ERR_WRONG_STATE : RFAL not initialized or incorrect mode
- ERR_PARAM : Invalid parameters
- ERR_IO : Generic internal error
- ERR_NONE : No error, one or more device in the field
Definition at line 324 of file rfal_nfcb.cpp.
uint32_t rfalNfcbTR2ToFDT | ( | uint8_t | tr2Code ) |
NFC-B TR2 code to FDT.
Converts the TR2 code as defined in Digital 1.1 Table 33 Minimum TR2 Coding to Frame Delay Time (FDT) in 1/Fc
- Parameters:
-
[in] tr2Code : TR2 code as defined in Digital 1.1 Table 33
- Returns:
- FDT in 1/Fc
Definition at line 497 of file rfal_nfcb.cpp.
Generated on Sat Jul 16 2022 13:00:53 by
