ST Expansion SW Team / RFAL

Dependents:   mbed-os-nfc05a1

Embed: (wiki syntax)

« Back to documentation index

RF

RFAL RF Abstraction Layer. More...

Data Structures

struct  rfalTransceiveContext
struct  rfalLmConfPA
struct  rfalLmConfPB
struct  rfalLmConfPF

Typedefs

typedef void(* rfalUpperLayerCallback )(void)
typedef void(* rfalPreTxRxCallback )(void)
typedef void(* rfalPostTxRxCallback )(void)
typedef uint8_t rfalFeliCaPollRes [RFAL_FELICA_POLL_RES_LEN]

Enumerations

enum  {
  RFAL_GT_NFCA = rfalConvMsTo1fc(5), RFAL_GT_NFCB = rfalConvMsTo1fc(5), RFAL_GT_NFCF = rfalConvMsTo1fc(20), RFAL_GT_NFCV = rfalConvMsTo1fc(1),
  RFAL_GT_NFCV_ADJUSTED = rfalConvMsTo1fc(1+4), RFAL_GT_PICOPASS = rfalConvMsTo1fc(1), RFAL_GT_AP2P = rfalConvMsTo1fc(5), RFAL_GT_AP2P_ADJUSTED = rfalConvMsTo1fc(5+25)
}
enum  {
  RFAL_FDT_LISTEN_NFCA_POLLER = 1172, RFAL_FDT_LISTEN_NFCB_POLLER = 1008, RFAL_FDT_LISTEN_NFCF_POLLER = 2672, RFAL_FDT_LISTEN_NFCV_POLLER = 4192,
  RFAL_FDT_LISTEN_PICOPASS_POLLER = 3400, RFAL_FDT_LISTEN_AP2P_POLLER = 64, RFAL_FDT_LISTEN_NFCA_LISTENER = 1172, RFAL_FDT_LISTEN_NFCB_LISTENER = 1024,
  RFAL_FDT_LISTEN_NFCF_LISTENER = 2688, RFAL_FDT_LISTEN_AP2P_LISTENER = 64
}
enum  {
  RFAL_FDT_POLL_NFCA_POLLER = 6780, RFAL_FDT_POLL_NFCA_T1T_POLLER = 384, RFAL_FDT_POLL_NFCB_POLLER = 6780, RFAL_FDT_POLL_NFCF_POLLER = 2672,
  RFAL_FDT_POLL_NFCV_POLLER = 4192, RFAL_FDT_POLL_PICOPASS_POLLER = 1790, RFAL_FDT_POLL_AP2P_POLLER = 0
}
enum  rfalMode {
  RFAL_MODE_NONE = 0, RFAL_MODE_POLL_NFCA = 1, RFAL_MODE_POLL_NFCA_T1T = 2, RFAL_MODE_POLL_NFCB = 3,
  RFAL_MODE_POLL_B_PRIME = 4, RFAL_MODE_POLL_B_CTS = 5, RFAL_MODE_POLL_NFCF = 6, RFAL_MODE_POLL_NFCV = 7,
  RFAL_MODE_POLL_PICOPASS = 8, RFAL_MODE_POLL_ACTIVE_P2P = 9, RFAL_MODE_LISTEN_NFCA = 10, RFAL_MODE_LISTEN_NFCB = 11,
  RFAL_MODE_LISTEN_NFCF = 12, RFAL_MODE_LISTEN_ACTIVE_P2P = 13
}
enum  rfalBitRate {
  RFAL_BR_106 = 0, RFAL_BR_212 = 1, RFAL_BR_424 = 2, RFAL_BR_848 = 3,
  RFAL_BR_1695 = 4, RFAL_BR_3390 = 5, RFAL_BR_6780 = 6, RFAL_BR_52p97 = 0xEB,
  RFAL_BR_26p48 = 0xEC, RFAL_BR_1p66 = 0xED, RFAL_BR_KEEP = 0xFF
}
enum  rfalComplianceMode { RFAL_COMPLIANCE_MODE_NFC, RFAL_COMPLIANCE_MODE_EMV, RFAL_COMPLIANCE_MODE_ISO }
enum  rfalState
enum  rfalTransceiveState
enum  {
  RFAL_TXRX_FLAGS_CRC_TX_AUTO = (0<<0), RFAL_TXRX_FLAGS_CRC_TX_MANUAL = (1<<0), RFAL_TXRX_FLAGS_CRC_RX_KEEP = (1<<1), RFAL_TXRX_FLAGS_CRC_RX_REMV = (0<<1),
  RFAL_TXRX_FLAGS_NFCIP1_ON = (1<<2), RFAL_TXRX_FLAGS_NFCIP1_OFF = (0<<2), RFAL_TXRX_FLAGS_AGC_OFF = (1<<3), RFAL_TXRX_FLAGS_AGC_ON = (0<<3),
  RFAL_TXRX_FLAGS_PAR_RX_KEEP = (1<<4), RFAL_TXRX_FLAGS_PAR_RX_REMV = (0<<0), RFAL_TXRX_FLAGS_PAR_TX_NONE = (1<<5), RFAL_TXRX_FLAGS_PAR_TX_AUTO = (0<<5),
  RFAL_TXRX_FLAGS_NFCV_FLAG_MANUAL = (1<<6), RFAL_TXRX_FLAGS_NFCV_FLAG_AUTO = (0<<6)
}
enum  rfalEHandling { RFAL_ERRORHANDLING_NONE = 0, RFAL_ERRORHANDLING_NFC = 1, RFAL_ERRORHANDLING_EMVCO = 2 }
enum  rfal14443AShortFrameCmd { RFAL_14443A_SHORTFRAME_CMD_WUPA = 0x52, RFAL_14443A_SHORTFRAME_CMD_REQA = 0x26 }
enum  { RFAL_FELICA_POLL_RC_NO_REQUEST = 0x00, RFAL_FELICA_POLL_RC_SYSTEM_CODE = 0x01, RFAL_FELICA_POLL_RC_COM_PERFORMANCE = 0x02 }
enum  rfalFeliCaPollSlots {
  RFAL_FELICA_1_SLOT = 0, RFAL_FELICA_2_SLOTS = 1, RFAL_FELICA_4_SLOTS = 3, RFAL_FELICA_8_SLOTS = 7,
  RFAL_FELICA_16_SLOTS = 15
}
enum  rfalLmNfcidLen { RFAL_LM_NFCID_LEN_04 = 4, RFAL_LM_NFCID_LEN_07 = 7, RFAL_LM_NFCID_LEN_10 = 10 }
enum  rfalLmState {
  RFAL_LM_STATE_NOT_INIT = 0x00, RFAL_LM_STATE_POWER_OFF = 0x01, RFAL_LM_STATE_IDLE = 0x02, RFAL_LM_STATE_READY_A = 0x03,
  RFAL_LM_STATE_READY_B = 0x04, RFAL_LM_STATE_READY_F = 0x05, RFAL_LM_STATE_ACTIVE_A = 0x06, RFAL_LM_STATE_CARDEMU_4A = 0x07,
  RFAL_LM_STATE_CARDEMU_4B = 0x08, RFAL_LM_STATE_CARDEMU_3 = 0x09, RFAL_LM_STATE_TARGET_A = 0x0A, RFAL_LM_STATE_TARGET_F = 0x0B,
  RFAL_LM_STATE_SLEEP_A = 0x0C, RFAL_LM_STATE_SLEEP_B = 0x0D, RFAL_LM_STATE_READY_Ax = 0x0E, RFAL_LM_STATE_ACTIVE_Ax = 0x0F,
  RFAL_LM_STATE_SLEEP_AF = 0x10
}
enum  rfalWumState { RFAL_WUM_STATE_NOT_INIT = 0x00, RFAL_WUM_STATE_ENABLED = 0x01, RFAL_WUM_STATE_ENABLED_WOKE = 0x02 }

Functions

ReturnCode rfalInitialize (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)
 RFAL Initialize.
ReturnCode rfalCalibrate (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)
 RFAL Calibrate.
ReturnCode rfalAdjustRegulators (uint16_t *result, DigitalOut *gpio_cs, InterruptIn *IRQ, DigitalOut *fieldLED_01, DigitalOut *fieldLED_02, DigitalOut *fieldLED_03, DigitalOut *fieldLED_04, DigitalOut *fieldLED_05, DigitalOut *fieldLED_06)
 RFAL Adjust Regulators.
void rfalSetUpperLayerCallback (rfalUpperLayerCallback pFunc)
 RFAL Set System Callback.
void rfalSetPreTxRxCallback (rfalPreTxRxCallback pFunc)
 RFAL Set Pre Tx Callback.
void rfalSetPostTxRxCallback (rfalPostTxRxCallback pFunc)
 RFAL Set Post Tx Callback.
ReturnCode rfalDeinitialize (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)
 RFAL Deinitialize.
ReturnCode rfalSetMode (rfalMode mode, rfalBitRate txBR, rfalBitRate rxBR, 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)
 RFAL Set Mode.
rfalMode rfalGetMode (void)
 RFAL Get Mode.
ReturnCode rfalSetBitRate (rfalBitRate txBR, rfalBitRate rxBR, 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)
 RFAL Set Bit Rate.
ReturnCode rfalGetBitRate (rfalBitRate *txBR, rfalBitRate *rxBR)
 RFAL Get Bit Rate.
ReturnCode rfalSetModulatedRFO (uint8_t rfo, 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)
 RFAL Set Modulated RFO.
uint8_t rfalGetModulatedRFO (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)
 RFAL Get Modulated RFO.
ReturnCode rfalMeasureRF (uint8_t *result, 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)
 RFAL Measure RF Amplitude.
void rfalSetErrorHandling (rfalEHandling eHandling)
 Set Error Handling Mode.
rfalEHandling rfalGetErrorHandling (void)
 Get Error Handling Mode.
void rfalSetObsvMode (uint8_t txMode, uint8_t rxMode)
 Set Observation Mode.
void rfalGetObsvMode (uint8_t *txMode, uint8_t *rxMode)
 Get Observation Mode.
void rfalDisableObsvMode (void)
 Disable Observation Mode.
void rfalSetFDTPoll (uint32_t fdt)
 RFAL Set FDT Poll.
uint32_t rfalGetFDTPoll (void)
 RFAL Set FDT Poll.
void rfalSetFDTListen (uint32_t fdt)
 RFAL Set FDT Listen.
uint32_t rfalGetFDTListen (void)
 RFAL Set FDT Listen.
uint32_t rfalGetGT (void)
 RFAL Get GT.
void rfalSetGT (uint32_t gt)
 RFAL Set GT.
bool rfalIsGTExpired (void)
 RFAL Is GT expired.
ReturnCode rfalFieldOnAndStartGT (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)
 RFAL Turn Field On and Start GT.
ReturnCode rfalFieldOff (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)
 RFAL Turn Field Off.
ReturnCode rfalStartTransceive (rfalTransceiveContext *ctx, 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)
 RFAL Set transceive context.
rfalTransceiveState rfalGetTransceiveState (void)
 Get Transceive State.
ReturnCode rfalGetTransceiveStatus (void)
 Get Transceive Status.
void rfalWorker (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)
 RFAL Worker.
ReturnCode rfalISO14443ATransceiveShortFrame (rfal14443AShortFrameCmd txCmd, uint8_t *rxBuf, uint8_t rxBufLen, uint16_t *rxRcvdLen, uint32_t fwt, 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)
 Transceives an ISO14443A ShortFrame.
ReturnCode rfalISO14443ATransceiveAnticollisionFrame (uint8_t *buf, uint8_t *bytesToSend, uint8_t *bitsToSend, uint16_t *rxLength, uint32_t fwt, 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)
 Sends an ISO14443A Anticollision Frame.
ReturnCode rfalFeliCaPoll (rfalFeliCaPollSlots slots, uint16_t sysCode, uint8_t reqCode, rfalFeliCaPollRes *pollResList, uint8_t pollResListSize, uint8_t *devicesDetected, uint8_t *collisionsDetected, 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)
 FeliCa Poll.
ReturnCode rfalISO15693TransceiveAnticollisionFrame (uint8_t *txBuf, uint8_t txBufLen, uint8_t *rxBuf, uint8_t rxBufLen, uint16_t *actLen, 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)
 Sends an ISO15693 Anticollision Frame.
ReturnCode rfalISO15693TransceiveAnticollisionEOF (uint8_t *rxBuf, uint8_t rxBufLen, uint16_t *actLen, 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)
 Sends an ISO15693 Anticollision EOF.
ReturnCode rfalISO15693TransceiveEOF (uint8_t *rxBuf, uint8_t rxBufLen, uint16_t *actLen, SPI *mspiChannel, ST25R3911 *mST25, DigitalOut *gpio_cs, InterruptIn *IRQ)
 Sends an ISO15693 Slot Marker.
ReturnCode rfalTransceiveBlockingTx (uint8_t *txBuf, uint16_t txBufLen, uint8_t *rxBuf, uint16_t rxBufLen, uint16_t *actLen, uint32_t flags, uint32_t fwt, 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)
 Transceive Blocking Tx.
ReturnCode rfalTransceiveBlockingRx (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)
 Transceive Blocking Rx.
ReturnCode rfalTransceiveBlockingTxRx (uint8_t *txBuf, uint16_t txBufLen, uint8_t *rxBuf, uint16_t rxBufLen, uint16_t *actLen, uint32_t flags, uint32_t fwt, 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)
 Transceive Blocking.
bool rfalIsExtFieldOn (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)
 Is external Field On.
ReturnCode rfalListenStart (uint32_t lmMask, rfalLmConfPA *confA, rfalLmConfPB *confB, rfalLmConfPF *confF, uint8_t *rxBuf, uint16_t rxBufLen, uint16_t *rxLen, 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)
 Listen Mode start.
ReturnCode rfalListenSleepStart (rfalLmState sleepSt, uint8_t *rxBuf, uint16_t rxBufLen, uint16_t *rxLen)
 Listen Mode start Sleeping.
ReturnCode rfalListenStop (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)
 Listen Mode Stop.
rfalLmState rfalListenGetState (bool *dataFlag, rfalBitRate *lastBR)
 Listen Mode get state.
ReturnCode rfalListenSetState (rfalLmState newSt, 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)
 Listen Mode set state.
ReturnCode rfalWakeUpModeStart (void *config, ST25R3911 *mST25, SPI *mspiChannel, DigitalOut *gpio_cs, InterruptIn *IRQ, DigitalOut *fieldLED_01, DigitalOut *fieldLED_02, DigitalOut *fieldLED_03, DigitalOut *fieldLED_04, DigitalOut *fieldLED_05, DigitalOut *fieldLED_06)
 Wake-Up Mode Start.
bool rfalWakeUpModeHasWoke (ST25R3911 *mST25, SPI *mspiChannel, DigitalOut *gpio_cs, InterruptIn *IRQ, DigitalOut *fieldLED_01, DigitalOut *fieldLED_02, DigitalOut *fieldLED_03, DigitalOut *fieldLED_04, DigitalOut *fieldLED_05, DigitalOut *fieldLED_06)
 Wake-Up Has Woke.
ReturnCode rfalWakeUpModeStop (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)
 Wake-Up Mode Stop.

Detailed Description

RFAL RF Abstraction Layer.


Typedef Documentation

typedef uint8_t rfalFeliCaPollRes[RFAL_FELICA_POLL_RES_LEN]

NFCF Poll Response NFC Forum Digital 1.1 Table 44

Definition at line 462 of file rfal_rf.h.

typedef void(* rfalPostTxRxCallback)(void)

Callback to be executed after a Transceive

Definition at line 414 of file rfal_rf.h.

typedef void(* rfalPreTxRxCallback)(void)

Callback to be executed before a Transceive

Definition at line 411 of file rfal_rf.h.

typedef void(* rfalUpperLayerCallback)(void)

System callback to indicate an event that requires a system reRun

Definition at line 408 of file rfal_rf.h.


Enumeration Type Documentation

anonymous enum

RFAL Guard Time (GT) default values

Enumerator:
RFAL_GT_NFCA 

GTA Digital 1.1 6.10.4.1 & A.2

RFAL_GT_NFCB 

GTB Digital 1.1 7.9.4.1 & A.3

RFAL_GT_NFCF 

GTF Digital 1.1 8.7.4.1 & A.4

RFAL_GT_NFCV 

GTV NFC Forum NFCV Change Request 9.7.1.1 & A.2

RFAL_GT_NFCV_ADJUSTED 

Adjusted GT for greater interoperability (ISO15693 Dynamic Tags)

RFAL_GT_PICOPASS 

GT Picopass

RFAL_GT_AP2P 

TIRFG Ecma 340 11.1.1

RFAL_GT_AP2P_ADJUSTED 

Adjusted GT for greater interoperability (Sony XPERIA P, Nokia N9, Huawei P2)

Definition at line 236 of file rfal_rf.h.

anonymous enum

RFAL Frame Delay Time (FDT) Listen default values

Enumerator:
RFAL_FDT_LISTEN_NFCA_POLLER 

FDTA,LISTEN,MIN (n=9) Last bit: Logic "1" - tnn,min/2 Digital 1.1 6.10 ; EMV CCP Spec Book D v2.01 4.8.1.3

RFAL_FDT_LISTEN_NFCB_POLLER 

TR0B,MIN Digital 1.1 7.1.3 & A.3 ; EMV CCP Spec Book D v2.01 4.8.1.3 & Table A.5

RFAL_FDT_LISTEN_NFCF_POLLER 

TR0F,LISTEN,MIN Digital 1.1 8.7.1.1 & A.4

RFAL_FDT_LISTEN_NFCV_POLLER 

t1 min 4192/fc (309,2us) ISO15693 3 Table 8

RFAL_FDT_LISTEN_PICOPASS_POLLER 

ISO15693 t1 min - observed adjustment

RFAL_FDT_LISTEN_AP2P_POLLER 

FDT AP2P No actual FDTListen is required as fields switch and collision avoidance

RFAL_FDT_LISTEN_NFCA_LISTENER 

FDTA,LISTEN,MIN Digital 1.1 6.10

RFAL_FDT_LISTEN_NFCB_LISTENER 

TR0B,MIN Digital 1.1 7.1.3 & A.3 ; EMV CCP Spec Book D v2.01 4.8.1.3 & Table A.5

RFAL_FDT_LISTEN_NFCF_LISTENER 

TR0F,LISTEN,MIN Digital 1.1 8.7.1.1 & A.4

RFAL_FDT_LISTEN_AP2P_LISTENER 

FDT AP2P No actual FDTListen exists as fields switch and collision avoidance

Definition at line 249 of file rfal_rf.h.

anonymous enum

RFAL Frame Delay Time (FDT) Poll default values

Enumerator:
RFAL_FDT_POLL_NFCA_POLLER 

FDTA,POLL,MIN Digital 1.1 6.10.3.1 & A.2

RFAL_FDT_POLL_NFCA_T1T_POLLER 

RRDDT1T,MIN,B1 Digital 1.1 10.7.1 & A.5

RFAL_FDT_POLL_NFCB_POLLER 

FDTB,POLL,MIN = TR2B,MIN,DEFAULT Digital 1.1 7.9.3 & A.3

RFAL_FDT_POLL_NFCF_POLLER 

FDTF,POLL,MIN Digital 1.1 8.7.3 & A.4

RFAL_FDT_POLL_NFCV_POLLER 

FDTV,POLL NFC Forum NFCV Change Request A.2

RFAL_FDT_POLL_PICOPASS_POLLER 

FDT Max

RFAL_FDT_POLL_AP2P_POLLER 

FDT AP2P No actual FDTPoll exists as fields switch and collision avoidance

Definition at line 264 of file rfal_rf.h.

anonymous enum

RFAL transceive flags

Enumerator:
RFAL_TXRX_FLAGS_CRC_TX_AUTO 

CRC will be generated automatic upon transmission

RFAL_TXRX_FLAGS_CRC_TX_MANUAL 

CRC was calculated manually, included in txBuffer

RFAL_TXRX_FLAGS_CRC_RX_KEEP 

Upon Reception keep the CRC in rxBuffer (reflected on rcvd length)

RFAL_TXRX_FLAGS_CRC_RX_REMV 

Upon Reception remove the CRC from rxBuffer

RFAL_TXRX_FLAGS_NFCIP1_ON 

Enable NFCIP1 mode: Add SB(F0) and LEN bytes during Tx and skip SB(F0) byte during Rx

RFAL_TXRX_FLAGS_NFCIP1_OFF 

Disable NFCIP1 mode: do not append protocol bytes while Tx nor skip while Rx

RFAL_TXRX_FLAGS_AGC_OFF 

Disable Automatic Gain Control, improving multiple devices collision detection

RFAL_TXRX_FLAGS_AGC_ON 

Enable Automatic Gain Control, improving single device reception

RFAL_TXRX_FLAGS_PAR_RX_KEEP 

Disable Parity and CRC check and keep the Parity and CRC bits in the received buffer

RFAL_TXRX_FLAGS_PAR_RX_REMV 

Enable Parity check and remove the parity bits from the received buffer

RFAL_TXRX_FLAGS_PAR_TX_NONE 

Disable automatic Parity generation (ISO14443A) and use the one provided in the buffer

RFAL_TXRX_FLAGS_PAR_TX_AUTO 

Enable automatic Parity generation (ISO14443A)

RFAL_TXRX_FLAGS_NFCV_FLAG_MANUAL 

Disable automatic adaption of flag byte (ISO15693) according to current comm params

RFAL_TXRX_FLAGS_NFCV_FLAG_AUTO 

Enable automatic adaption of flag byte (ISO115693) according to current comm params

Definition at line 367 of file rfal_rf.h.

anonymous enum

NFC-F RC (Request Code) codes NFC Forum Digital 1.1 Table 42

Enumerator:
RFAL_FELICA_POLL_RC_NO_REQUEST 

RC: No System Code information requested

RFAL_FELICA_POLL_RC_SYSTEM_CODE 

RC: System Code information requested

RFAL_FELICA_POLL_RC_COM_PERFORMANCE 

RC: Advanced protocol features supported

Definition at line 442 of file rfal_rf.h.

RFAL ISO 14443A Short Frame Command

Enumerator:
RFAL_14443A_SHORTFRAME_CMD_WUPA 

ISO14443A WUPA / NFC-A ALL_REQ

RFAL_14443A_SHORTFRAME_CMD_REQA 

ISO14443A REQA / NFC-A SENS_REQ

Definition at line 422 of file rfal_rf.h.

RFAL Bit rates

Enumerator:
RFAL_BR_106 

Bit Rate 106 kbit/s (fc/128)

RFAL_BR_212 

Bit Rate 212 kbit/s (fc/64)

RFAL_BR_424 

Bit Rate 424 kbit/s (fc/32)

RFAL_BR_848 

Bit Rate 848 kbit/s (fc/16)

RFAL_BR_1695 

Bit Rate 1695 kbit/s (fc/8)

RFAL_BR_3390 

Bit Rate 3390 kbit/s (fc/4)

RFAL_BR_6780 

Bit Rate 6780 kbit/s (fc/2)

RFAL_BR_52p97 

Bit Rate 52.97 kbit/s (fc/256) Fast Mode VICC->VCD

RFAL_BR_26p48 

Bit Rate 26,48 kbit/s (fc/512) NFCV VICC->VCD & VCD->VICC 1of4

RFAL_BR_1p66 

Bit Rate 1,66 kbit/s (fc/8192) NFCV VCD->VICC 1of256

RFAL_BR_KEEP 

Value indicating to keep the same previous bit rate

Definition at line 301 of file rfal_rf.h.

RFAL Compliance modes for upper modules

Enumerator:
RFAL_COMPLIANCE_MODE_NFC 

Perform with NFC Forum 1.1 compliance

RFAL_COMPLIANCE_MODE_EMV 

Perform with EMVCo compliance

RFAL_COMPLIANCE_MODE_ISO 

Perform with ISO10373 compliance

Definition at line 317 of file rfal_rf.h.

RFAL error handling

Enumerator:
RFAL_ERRORHANDLING_NONE 

No special error handling will be performed

RFAL_ERRORHANDLING_NFC 

Error handling set to perform as NFC complaint device

RFAL_ERRORHANDLING_EMVCO 

Error handling set to perform as EMVCo complaint device

Definition at line 386 of file rfal_rf.h.

NFC-F TSN (Time Slot Number) codes NFC Forum Digital 1.1 Table 43

Enumerator:
RFAL_FELICA_1_SLOT 

TSN with number of Time Slots: 1

RFAL_FELICA_2_SLOTS 

TSN with number of Time Slots: 2

RFAL_FELICA_4_SLOTS 

TSN with number of Time Slots: 4

RFAL_FELICA_8_SLOTS 

TSN with number of Time Slots: 8

RFAL_FELICA_16_SLOTS 

TSN with number of Time Slots: 16

Definition at line 451 of file rfal_rf.h.

RFAL Listen Mode NFCID Length

Enumerator:
RFAL_LM_NFCID_LEN_04 

Listen mode indicates 4 byte NFCID

RFAL_LM_NFCID_LEN_07 

Listen mode indicates 7 byte NFCID

RFAL_LM_NFCID_LEN_10 

Listen mode indicates 10 byte NFCID

Definition at line 473 of file rfal_rf.h.

RFAL Listen Mode States

Enumerator:
RFAL_LM_STATE_NOT_INIT 

Not Initialized state

RFAL_LM_STATE_POWER_OFF 

Power Off state

RFAL_LM_STATE_IDLE 

Idle state Activity 1.1 5.2

RFAL_LM_STATE_READY_A 

Ready A state Activity 1.1 5.3 5.4 & 5.5

RFAL_LM_STATE_READY_B 

Ready B state Activity 1.1 5.11 5.12

RFAL_LM_STATE_READY_F 

Ready F state Activity 1.1 5.15

RFAL_LM_STATE_ACTIVE_A 

Active A state Activity 1.1 5.6

RFAL_LM_STATE_CARDEMU_4A 

Card Emulation 4A state Activity 1.1 5.10

RFAL_LM_STATE_CARDEMU_4B 

Card Emulation 4B state Activity 1.1 5.14

RFAL_LM_STATE_CARDEMU_3 

Card Emulation 3 state Activity 1.1 5.18

RFAL_LM_STATE_TARGET_A 

Target A state Activity 1.1 5.9

RFAL_LM_STATE_TARGET_F 

Target F state Activity 1.1 5.17

RFAL_LM_STATE_SLEEP_A 

Sleep A state Activity 1.1 5.7

RFAL_LM_STATE_SLEEP_B 

Sleep B state Activity 1.1 5.13

RFAL_LM_STATE_READY_Ax 

Ready A* state Activity 1.1 5.3 5.4 & 5.5

RFAL_LM_STATE_ACTIVE_Ax 

Active A* state Activity 1.1 5.6

RFAL_LM_STATE_SLEEP_AF 

Sleep AF state Activity 1.1 5.19

Definition at line 482 of file rfal_rf.h.

enum rfalMode

RFAL modes

Enumerator:
RFAL_MODE_NONE 

No mode selected/defined

RFAL_MODE_POLL_NFCA 

Mode to perform as NFCA (ISO14443A) Poller (PCD)

RFAL_MODE_POLL_NFCA_T1T 

Mode to perform as NFCA T1T (Topaz) Poller (PCD)

RFAL_MODE_POLL_NFCB 

Mode to perform as NFCB (ISO14443B) Poller (PCD)

RFAL_MODE_POLL_B_PRIME 

Mode to perform as B' Calypso (Innovatron) (PCD)

RFAL_MODE_POLL_B_CTS 

Mode to perform as CTS Poller (PCD)

RFAL_MODE_POLL_NFCF 

Mode to perform as NFCF (FeliCa) Poller (PCD)

RFAL_MODE_POLL_NFCV 

Mode to perform as NFCV (ISO15963) Poller (PCD)

RFAL_MODE_POLL_PICOPASS 

Mode to perform as PicoPass / iClass Poller (PCD)

RFAL_MODE_POLL_ACTIVE_P2P 

Mode to perform as Active P2P (ISO18092) Initiator

RFAL_MODE_LISTEN_NFCA 

Mode to perform as NFCA (ISO14443A) Listener (PICC)

RFAL_MODE_LISTEN_NFCB 

Mode to perform as NFCA (ISO14443B) Listener (PICC)

RFAL_MODE_LISTEN_NFCF 

Mode to perform as NFCA (ISO15963) Listener (PICC)

RFAL_MODE_LISTEN_ACTIVE_P2P 

Mode to perform as Active P2P (ISO18092) Target

Definition at line 282 of file rfal_rf.h.

enum rfalState

RFAL main states flags

Definition at line 325 of file rfal_rf.h.

RFAL transceive states

Definition at line 337 of file rfal_rf.h.

RFAL Wake-Up Mode States

Enumerator:
RFAL_WUM_STATE_NOT_INIT 

Not Initialized state

RFAL_WUM_STATE_ENABLED 

Wake-Up mode is enabled

RFAL_WUM_STATE_ENABLED_WOKE 

Wake-Up mode enabled and has received IRQ(s)

Definition at line 536 of file rfal_rf.h.


Function Documentation

ReturnCode rfalAdjustRegulators ( uint16_t *  result,
DigitalOut *  gpio_cs,
InterruptIn *  IRQ,
DigitalOut *  fieldLED_01,
DigitalOut *  fieldLED_02,
DigitalOut *  fieldLED_03,
DigitalOut *  fieldLED_04,
DigitalOut *  fieldLED_05,
DigitalOut *  fieldLED_06 
)

RFAL Adjust Regulators.

Adjusts ST25R391x regulators

Parameters:
[out]result: the result of the calibrate antenna in mV NULL if result not requested
Returns:
ERR_WRONG_STATE : RFAL not initialized
ERR_NONE : No error
ReturnCode rfalCalibrate ( 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 
)

RFAL Calibrate.

Performs necessary calibration of RF chip in case it is indicated by current register settings. E.g. antenna calibration and regulator calibration

Returns:
ERR_WRONG_STATE : RFAL not initialized
ERR_NONE : No error

Definition at line 478 of file rfal_rf.cpp.

ReturnCode rfalDeinitialize ( 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 
)

RFAL Deinitialize.

Deinitializes RFAL layer and the ST25R391x

Returns:
ERR_NONE : No error

Definition at line 560 of file rfal_rf.cpp.

void rfalDisableObsvMode ( void   )

Disable Observation Mode.

Disables the ST25R391x observation mode

Definition at line 594 of file rfal_rf.cpp.

ReturnCode rfalFeliCaPoll ( rfalFeliCaPollSlots  slots,
uint16_t  sysCode,
uint8_t  reqCode,
rfalFeliCaPollRes pollResList,
uint8_t  pollResListSize,
uint8_t *  devicesDetected,
uint8_t *  collisionsDetected,
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 
)

FeliCa Poll.

Sends a Poll Request and collects all Poll Responses according to the given slots

Parameters:
[in]slots: number of slots for the Poll Request
[in]sysCode: system code (SC) for the Poll Request
[in]reqCode: request code (RC) for the Poll Request
[out]pollResList: list of all responses
[in]pollResListSize: number of responses that can be placed in pollResList
[out]devicesDetected: number of cards found
[out]collisionsDetected,:number of collisions detected
Returns:
ERR_NONE if there is no error
ERR_TIMEOUT if there is no response

Definition at line 2690 of file rfal_rf.cpp.

ReturnCode rfalFieldOff ( 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 
)

RFAL Turn Field Off.

Turns the Field Off

Returns:
ERR_NONE : Field turned Off

Definition at line 1092 of file rfal_rf.cpp.

ReturnCode rfalFieldOnAndStartGT ( 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 
)

RFAL Turn Field On and Start GT.

Turns the Field On, performing Initial Collision Avoidance

After Field On, if GT was set before, it starts the GT timer to be used on the following communications.

Returns:
ERR_RF_COLLISION : External field detected
ERR_NONE : Field turned On

Definition at line 1050 of file rfal_rf.cpp.

ReturnCode rfalGetBitRate ( rfalBitRate txBR,
rfalBitRate rxBR 
)

RFAL Get Bit Rate.

Gets the Tx and Rx current bit rates

If RFAL is not initialized or mode not set the bit rates return will be invalid RFAL_BR_KEEP

Parameters:
[out]txBR: RFAL's current Tx Bit Rate
[out]rxBR: RFAL's current Rx Bit Rate
See also:
rfalSetBitRate
rfalBitRate
Returns:
ERR_WRONG_STATE : RFAL not initialized or mode not set
ERR_NONE : No error

Definition at line 935 of file rfal_rf.cpp.

rfalEHandling rfalGetErrorHandling ( void   )

Get Error Handling Mode.

Gets the error handling mode currently used by the RFAL

Returns:
rfalEHandling : Current error handling mode

Definition at line 993 of file rfal_rf.cpp.

uint32_t rfalGetFDTListen ( void   )

RFAL Set FDT Listen.

Gets the Frame Delay Time (FDT) Listen minimum

FDT Listen is the minimum time between a Poll Frame and a Listen Frame FDTx,LISTEN,MIN - Digital 1.1 6.10.1 & 7.9.1 & 8.7.1

Returns:
FDT : current FDT value in 1/fc cycles

Definition at line 1020 of file rfal_rf.cpp.

uint32_t rfalGetFDTPoll ( void   )

RFAL Set FDT Poll.

Gets the current Frame Delay Time (FDT)

FDT Poll is the minimum time following a Poll Frame during which no subsequent Poll Frame can be sent (without a response from the Listener in between) FDTx,PP,MIN - Digital 1.1 6.10.2 & 7.9.2 & 8.7.2

Returns:
FDT : current FDT value in 1/fc cycles

Definition at line 1007 of file rfal_rf.cpp.

uint32_t rfalGetGT ( void   )

RFAL Get GT.

Gets the current Guard Time (GT)

GT is the minimum time when a device in Listen Mode is exposed to an unmodulated carrier

Returns:
GT : Guard Time in 1/fc cycles

Definition at line 1031 of file rfal_rf.cpp.

rfalMode rfalGetMode ( void   )

RFAL Get Mode.

Gets the mode that RFAL is set to operate

See also:
rfalMode
Returns:
rfalMode : The current RFAL mode

Definition at line 813 of file rfal_rf.cpp.

uint8_t rfalGetModulatedRFO ( 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 
)

RFAL Get Modulated RFO.

Gets the RFO value used in the modulated state

Returns:
ERR_IO : Internal error
ERR_NONE : No error

Definition at line 966 of file rfal_rf.cpp.

void rfalGetObsvMode ( uint8_t *  txMode,
uint8_t *  rxMode 
)

Get Observation Mode.

Gets ST25R391x the current configured observation modes

Parameters:
[in]txMode: the current observation mode configured for transmission
[in]rxMode: the current observation mode configured for reception

Definition at line 579 of file rfal_rf.cpp.

rfalTransceiveState rfalGetTransceiveState ( void   )

Get Transceive State.

Gets current Transceive internal State

Returns:
rfalTransceiveState : the current Transceive internal State

Definition at line 1319 of file rfal_rf.cpp.

ReturnCode rfalGetTransceiveStatus ( void   )

Get Transceive Status.

Gets current Transceive status

Returns:
ERR_NONE : Transceive done with no error
ERR_BUSY : Transceive ongoing
ERR_XXXX : Error occurred
ERR_TIMEOUT : No response
ERR_FRAMING : Framing error detected
ERR_PAR : Parity error detected
ERR_CRC : CRC error detected
ERR_LINK_LOSS : Link Loss - External Field is Off
ERR_RF_COLLISION : Collision detected
ERR_IO : Internal error

Definition at line 1324 of file rfal_rf.cpp.

ReturnCode rfalInitialize ( 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 
)

RFAL Initialize.

Initializes RFAL layer and the ST25R391x Ensures that ST25R391x is properly connected and returns error if any problem is detected

Warning:
rfalAnalogConfigInitialize() should be called before so that the Analog config table has been previously initialized.
Returns:
ERR_HW_MISMATCH : Expected HW do not match or communication error
ERR_NONE : No error

Definition at line 389 of file rfal_rf.cpp.

bool rfalIsExtFieldOn ( 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 
)

Is external Field On.

Checks if external field (other peer/device) is on/detected

Returns:
true External field is On
false No external field is detected

Definition at line 2825 of file rfal_rf.cpp.

bool rfalIsGTExpired ( void   )

RFAL Is GT expired.

Checks whether the GT timer has expired

Returns:
true : GT has expired or not running
false : GT is still running

Definition at line 1037 of file rfal_rf.cpp.

ReturnCode rfalISO14443ATransceiveAnticollisionFrame ( uint8_t *  buf,
uint8_t *  bytesToSend,
uint8_t *  bitsToSend,
uint16_t *  rxLength,
uint32_t  fwt,
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 
)

Sends an ISO14443A Anticollision Frame.

This is use to perform ISO14443A anti-collision.

Note:
Anticollision is sent without CRC
Parameters:
[in]buf: reference to ANTICOLLISION command (with known UID if any) to be sent (also out param) reception will be place on this buf after bytesToSend
[in]bytesToSend,:reference number of full bytes to be sent (including CMD byte and SEL_PAR) if a collision occurs will contain the number of clear bytes
[in]bitsToSend: reference to number of bits (0-7) to be sent; and received (also out param) if a collision occurs will indicate the number of clear bits (also out param)
[out]rxLength: reference to the return the received length
[in]fwt: Frame Waiting Time in 1/fc
Returns:
ERR_NONE if there is no error

Definition at line 2511 of file rfal_rf.cpp.

ReturnCode rfalISO14443ATransceiveShortFrame ( rfal14443AShortFrameCmd  txCmd,
uint8_t *  rxBuf,
uint8_t  rxBufLen,
uint16_t *  rxRcvdLen,
uint32_t  fwt,
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 
)

Transceives an ISO14443A ShortFrame.

Sends REQA to detect if there is any PICC in the field

Parameters:
[in]txCmd,:Command to be sent: 0x52 WUPA / ALL_REQ 0x26 REQA / SENS_REQ
[in]txCmd: type of short frame to be sent REQA or WUPA
[out]rxBuf: buffer to place the response
[in]rxBufLen: length of rxBuf
[out]rxRcvdLen,:received length
[in]fwt: Frame Waiting Time in 1/fc
Warning:
If fwt is set to RFAL_FWT_NONE it will make endlessly for a response, which on a blocking method may not be the desired usage
Returns:
ERR_NONE if there is response
ERR_TIMEOUT if there is no response
ERR_COLLISION collision has occurred

Definition at line 2383 of file rfal_rf.cpp.

ReturnCode rfalISO15693TransceiveAnticollisionEOF ( uint8_t *  rxBuf,
uint8_t  rxBufLen,
uint16_t *  actLen,
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 
)

Sends an ISO15693 Anticollision EOF.

This sends the Anticollision|Inventory EOF used as a slot marker

Warning:
rxBuf must be able to contain the payload and CRC
Parameters:
[out]rxBuf: Buffer where incoming message will be placed
[in]rxBufLen: Maximum length of the incoming message in bytes
[out]actLen: Actual received length in bits
Returns:
ERR_NONE : Transceive done with no error
ERR_WRONG_STATE : RFAL not initialized or mode not set
ERR_IO : Internal error

Definition at line 2652 of file rfal_rf.cpp.

ReturnCode rfalISO15693TransceiveAnticollisionFrame ( uint8_t *  txBuf,
uint8_t  txBufLen,
uint8_t *  rxBuf,
uint8_t  rxBufLen,
uint16_t *  actLen,
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 
)

Sends an ISO15693 Anticollision Frame.

This send the Anticollision|Inventory frame (INVENTORY_REQ)

Warning:
rxBuf must be able to contain the payload and CRC
Parameters:
[in]txBuf: Buffer where outgoing message is located
[in]txBufLen: Length of the outgoing message in bytes
[out]rxBuf: Buffer where incoming message will be placed
[in]rxBufLen: Maximum length of the incoming message in bytes
[out]actLen: Actual received length in bits
Returns:
ERR_NONE : Transceive done with no error
ERR_WRONG_STATE : RFAL not initialized or mode not set
ERR_IO : Internal error

Definition at line 2613 of file rfal_rf.cpp.

ReturnCode rfalISO15693TransceiveEOF ( uint8_t *  rxBuf,
uint8_t  rxBufLen,
uint16_t *  actLen,
SPI *  mspiChannel,
ST25R3911 *  mST25,
DigitalOut *  gpio_cs,
InterruptIn *  IRQ 
)

Sends an ISO15693 Slot Marker.

This is method sends an ISO15693 (EoF) used for a Write operation

Warning:
rxBuf must be able to contain the payload and CRC
Parameters:
[out]rxBuf: Buffer where incoming message will be placed
[in]rxBufLen: Maximum length of the incoming message in bytes
[out]actLen: Actual received length in bytes
Returns:
ERR_NONE : Transceive done with no error
ERR_IO : Internal error
rfalLmState rfalListenGetState ( bool *  dataFlag,
rfalBitRate lastBR 
)

Listen Mode get state.

Sets the new state of the Listen Mode and applies the necessary changes on the RF Chip

Parameters:
[out]dataFlag,:indicates that Listen Mode has rcvd data and caller must process it. The received message is located at the rxBuf passed on rfalListenStart() rfalListenSetState() will clear this flag if NULL output parameter will no be written/returned
[out]lastBR,:bit rate detected of the last initiator request if NULL output parameter will no be written/returned
Returns:
rfalLmState RFAL_LM_STATE_NOT_INIT : LM not initialized properly Any Other : LM State

Definition at line 3038 of file rfal_rf.cpp.

ReturnCode rfalListenSetState ( rfalLmState  newSt,
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 
)

Listen Mode set state.

Sets the new state of the Listen Mode and applies the necessary changes on the RF Chip

Parameters:
[in]newSt: New state to go to
Returns:
ERR_WRONG_STATE : Not initialized properly
ERR_PARAM : Invalid parameter
ERR_NONE : Done with no error

Definition at line 3058 of file rfal_rf.cpp.

ReturnCode rfalListenSleepStart ( rfalLmState  sleepSt,
uint8_t *  rxBuf,
uint16_t  rxBufLen,
uint16_t *  rxLen 
)

Listen Mode start Sleeping.

Definition at line 3026 of file rfal_rf.cpp.

ReturnCode rfalListenStart ( uint32_t  lmMask,
rfalLmConfPA confA,
rfalLmConfPB confB,
rfalLmConfPF confF,
uint8_t *  rxBuf,
uint16_t  rxBufLen,
uint16_t *  rxLen,
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 
)

Listen Mode start.

Configures RF Chip to go into listen mode enabling the given technologies

Parameters:
[in]lmMask,:mask with the enabled/disabled listen modes use: RFAL_LM_MASK_NFCA ; RFAL_LM_MASK_NFCB ; RFAL_LM_MASK_NFCF ; RFAL_LM_MASK_ACTIVE_P2P
[in]confA,:pointer to Passive A configurations (NULL if disabled)
[in]confB,:pointer to Passive B configurations (NULL if disabled)
[in]confF,:pointer to Passive F configurations (NULL if disabled)
[in]rxBuf,:buffer to place incoming data
[in]rxBufLen,:length in bits of rxBuf
[in]rxLen,:pointer to write the data length in bits placed into rxBuf
Returns:
ERR_PARAM Invalid parameter
ERR_REQUEST Invalid listen mode mask
ERR_NONE Done with no error

Definition at line 2832 of file rfal_rf.cpp.

ReturnCode rfalListenStop ( 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 
)

Listen Mode Stop.

Disables the listen mode on the RF Chip

Warning:
the listen mode will be disabled immediately on the RFchip regardless of any ongoing operations like Transceive
Returns:
ERR_NONE Done with no error

Definition at line 3008 of file rfal_rf.cpp.

ReturnCode rfalMeasureRF ( uint8_t *  result,
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 
)

RFAL Measure RF Amplitude.

Measures the RF Amplitude

Parameters:
[out]result: result of RF measurement
Returns:
ERR_IO : Internal error
ERR_NONE : No error

Definition at line 977 of file rfal_rf.cpp.

ReturnCode rfalSetBitRate ( rfalBitRate  txBR,
rfalBitRate  rxBR,
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 
)

RFAL Set Bit Rate.

Sets the Tx and Rx bit rates with the given values The bit rate change is applied on the RF chip remaining in the same mode previous defined with rfalSetMode()

If no mode is defined bit rates will not be applied and an error is returned

Parameters:
[in]txBR: transmit bit rate
[in]rxBR: receive bit rate
See also:
rfalSetMode
rfalMode
rfalBitRate
Returns:
ERR_WRONG_STATE : RFAL not initialized
ERR_PARAM : Invalid parameter
ERR_NOT_IMPLEMENTED : Mode not implemented
ERR_NONE : No error

Definition at line 820 of file rfal_rf.cpp.

void rfalSetErrorHandling ( rfalEHandling  eHandling )

Set Error Handling Mode.

Sets the error handling mode to be used by the RFAL

Parameters:
[in]eHandling: the error handling mode

Definition at line 986 of file rfal_rf.cpp.

void rfalSetFDTListen ( uint32_t  fdt )

RFAL Set FDT Listen.

Sets the Frame Delay Time (FDT) Listen minimum to be used on the following communications.

FDT Listen is the minimum time between a Poll Frame and a Listen Frame FDTx,LISTEN,MIN - Digital 1.1 6.10.1 & 7.9.1 & 8.7.1

Parameters:
[in]fdt: Frame Delay Time in 1/fc cycles

Definition at line 1014 of file rfal_rf.cpp.

void rfalSetFDTPoll ( uint32_t  fdt )

RFAL Set FDT Poll.

Sets the Frame Delay Time (FDT) to be used on the following communications.

FDT Poll is the minimum time following a Poll Frame during which no subsequent Poll Frame can be sent (without a response from the Listener in between) FDTx,PP,MIN - Digital 1.1 6.10.2 & 7.9.2 & 8.7.2

Parameters:
[in]fdt: Frame Delay Time in 1/fc cycles

Definition at line 1000 of file rfal_rf.cpp.

void rfalSetGT ( uint32_t  gt )

RFAL Set GT.

Sets the Guard Time (GT) to be used on the following communications.

GT is the minimum time when a device in Listen Mode is exposed to an unmodulated carrier

Parameters:
[in]gt: Guard Time in 1/fc cycles RFAL_GT_NONE if no GT should be applied

Definition at line 1025 of file rfal_rf.cpp.

ReturnCode rfalSetMode ( rfalMode  mode,
rfalBitRate  txBR,
rfalBitRate  rxBR,
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 
)

RFAL Set Mode.

Sets the mode that RFAL will operate on the following communications. Proper initializations will be performed on the ST25R391x

Warning:
bit rate value RFAL_BR_KEEP is not allowed, only in rfalSetBitRate()
the mode will be applied immediately on the RFchip regardless of any ongoing operations like Transceive, ListenMode
Parameters:
[in]mode: mode for the RFAL/RFchip to perform
[in]txBR: transmit bit rate
[in]rxBR: receive bit rate
See also:
rfalIsGTDone
rfalMode
Returns:
ERR_WRONG_STATE : RFAL not initialized
ERR_PARAM : Invalid parameter
ERR_NONE : No error

Definition at line 602 of file rfal_rf.cpp.

ReturnCode rfalSetModulatedRFO ( uint8_t  rfo,
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 
)

RFAL Set Modulated RFO.

Sets the RFO value to be used in the modulated state

Parameters:
[in]rfo: the RFO value to be used
Returns:
ERR_IO : Internal error
ERR_NONE : No error

Definition at line 957 of file rfal_rf.cpp.

void rfalSetObsvMode ( uint8_t  txMode,
uint8_t  rxMode 
)

Set Observation Mode.

Sets ST25R391x observation modes for RF debug purposes

Parameters:
[in]txMode: the observation mode to be used during transmission
[in]rxMode: the observation mode to be used during reception
Warning:
The Observation Mode is an advanced feature and should be set according to the documentation of the part number in use. Please refer to the corresponding Datasheet or Application Note(s)

Definition at line 571 of file rfal_rf.cpp.

void rfalSetPostTxRxCallback ( rfalPostTxRxCallback  pFunc )

RFAL Set Post Tx Callback.

Sets a callback for the driver to call after a Transceive

Parameters:
[in]pFunc: method pointer for the Post Tx callback

Definition at line 553 of file rfal_rf.cpp.

void rfalSetPreTxRxCallback ( rfalPreTxRxCallback  pFunc )

RFAL Set Pre Tx Callback.

Sets a callback for the driver to call before a Transceive

Parameters:
[in]pFunc: method pointer for the Pre Tx callback

Definition at line 546 of file rfal_rf.cpp.

void rfalSetUpperLayerCallback ( rfalUpperLayerCallback  pFunc )

RFAL Set System Callback.

Sets a callback for the driver to call when an event has occurred that may require the system to be notified

Parameters:
[in]pFunc: method pointer for the upper layer callback

Definition at line 539 of file rfal_rf.cpp.

ReturnCode rfalStartTransceive ( rfalTransceiveContext ctx,
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 
)

RFAL Set transceive context.

Set the context that will be used for the following Transceive Output and input buffers have to be passed and all other details prior to the Transceive itself has been started

This method only sets the context, once set rfalWorker has to be executed until is done

Parameters:
[in]ctx: the context for the following Transceive
See also:
rfalWorker
rfalGetTransceiveStatus
Returns:
ERR_NONE : Done with no error
ERR_WRONG_STATE : Not initialized properly

Definition at line 1109 of file rfal_rf.cpp.

ReturnCode rfalTransceiveBlockingRx ( 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 
)

Transceive Blocking Rx.

This is method executes the reception of an ongoing Transceive triggered before by rfalTransceiveBlockingTx()

Returns:
ERR_NONE : Transceive done with no error
ERR_BUSY : Transceive ongoing
ERR_XXXX : Error occurred
ERR_TIMEOUT : No response
ERR_FRAMING : Framing error detected
ERR_PAR : Parity error detected
ERR_CRC : CRC error detected
ERR_LINK_LOSS : Link Loss - External Field is Off
ERR_RF_COLLISION : Collision detected
ERR_IO : Internal error

Definition at line 1265 of file rfal_rf.cpp.

ReturnCode rfalTransceiveBlockingTx ( uint8_t *  txBuf,
uint16_t  txBufLen,
uint8_t *  rxBuf,
uint16_t  rxBufLen,
uint16_t *  actLen,
uint32_t  flags,
uint32_t  fwt,
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 
)

Transceive Blocking Tx.

This is method triggers a Transceive and executes it blocking until the Tx has been completed

Parameters:
[in]txBuf: Buffer where outgoing message is located
[in]txBufLen: Length of the outgoing message in bytes
[out]rxBuf: Buffer where incoming message will be placed
[in]rxBufLen: Maximum length of the incoming message in bytes
[out]actLen: Actual received length in bits
[in]flags: TransceiveFlags indication special handling
[in]fwt: Frame Waiting Time in 1/fc
Returns:
ERR_NONE : Transceive done with no error
ERR_BUSY : Transceive ongoing
ERR_XXXX : Error occurred
ERR_LINK_LOSS : Link Loss - External Field is Off
ERR_RF_COLLISION : Collision detected
ERR_IO : Internal error

Definition at line 1233 of file rfal_rf.cpp.

ReturnCode rfalTransceiveBlockingTxRx ( uint8_t *  txBuf,
uint16_t  txBufLen,
uint8_t *  rxBuf,
uint16_t  rxBufLen,
uint16_t *  actLen,
uint32_t  flags,
uint32_t  fwt,
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 
)

Transceive Blocking.

This is method triggers a Transceive and executes it blocking until it has been completed

Parameters:
[in]txBuf: Buffer where outgoing message is located
[in]txBufLen: Length of the outgoing message in bytes
[out]rxBuf: Buffer where incoming message will be placed
[in]rxBufLen: Maximum length of the incoming message in bytes
[out]actLen: Actual received length in bytes
[in]flags: TransceiveFlags indication special handling
[in]fwt: Frame Waiting Time in 1/fc
Returns:
ERR_NONE : Transceive done with no error
ERR_BUSY : Transceive ongoing
ERR_XXXX : Error occurred
ERR_TIMEOUT : No response
ERR_FRAMING : Framing error detected
ERR_PAR : Parity error detected
ERR_CRC : CRC error detected
ERR_LINK_LOSS : Link Loss - External Field is Off
ERR_RF_COLLISION : Collision detected
ERR_IO : Internal error

Definition at line 1279 of file rfal_rf.cpp.

bool rfalWakeUpModeHasWoke ( ST25R3911 *  mST25,
SPI *  mspiChannel,
DigitalOut *  gpio_cs,
InterruptIn *  IRQ,
DigitalOut *  fieldLED_01,
DigitalOut *  fieldLED_02,
DigitalOut *  fieldLED_03,
DigitalOut *  fieldLED_04,
DigitalOut *  fieldLED_05,
DigitalOut *  fieldLED_06 
)

Wake-Up Has Woke.

Returns true if the Wake-Up mode is enabled and it has already received the indication from the RF Chip that the surrounding environment has changed and flagged at least one wake-Up interrupt

Returns:
true : Wake-Up mode enabled and has received a wake-up IRQ
false : no Wake-Up IRQ has been received

Definition at line 3379 of file rfal_rf.cpp.

ReturnCode rfalWakeUpModeStart ( void *  config,
ST25R3911 *  mST25,
SPI *  mspiChannel,
DigitalOut *  gpio_cs,
InterruptIn *  IRQ,
DigitalOut *  fieldLED_01,
DigitalOut *  fieldLED_02,
DigitalOut *  fieldLED_03,
DigitalOut *  fieldLED_04,
DigitalOut *  fieldLED_05,
DigitalOut *  fieldLED_06 
)

Wake-Up Mode Start.

Sets the RF Chip in Low Power Wake-Up Mode according to the given configuration.

Parameters:
[in]config: Generic Wake-Up configuration provided by lower layers. If NULL will automatically configure the Wake-Up mode
Returns:
ERR_WRONG_STATE : Not initialized properly
ERR_PARAM : Invalid parameter
ERR_NONE : Done with no error

Definition at line 3225 of file rfal_rf.cpp.

ReturnCode rfalWakeUpModeStop ( 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 
)

Wake-Up Mode Stop.

Stops the Wake-Up Mode

Returns:
ERR_WRONG_STATE : Not initialized properly
ERR_PARAM : Invalid parameter
ERR_NONE : Done with no error

Definition at line 3432 of file rfal_rf.cpp.

void rfalWorker ( 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 
)

RFAL Worker.

This runs RFAL layer, which drives the actual Transceive procedure It MUST be executed frequently in order to execute the RFAL internal states and perform the requested operations

Definition at line 1332 of file rfal_rf.cpp.