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.
ST25R3911_Driver
[ST25R3911]
RFAL ST25R3911 Driver. More...
Data Structures | |
| struct | st25r3911StreamConfig |
| struct | st25r3911WakeUpConfig |
Enumerations | |
| enum | st25r3911WumPeriod { ST25R3911_WUM_PERIDOD_10MS = 0x00, ST25R3911_WUM_PERIDOD_20MS = 0x01, ST25R3911_WUM_PERIDOD_30MS = 0x02, ST25R3911_WUM_PERIDOD_40MS = 0x03, ST25R3911_WUM_PERIDOD_50MS = 0x04, ST25R3911_WUM_PERIDOD_60MS = 0x05, ST25R3911_WUM_PERIDOD_70MS = 0x06, ST25R3911_WUM_PERIDOD_80MS = 0x07, ST25R3911_WUM_PERIDOD_100MS = 0x10, ST25R3911_WUM_PERIDOD_200MS = 0x11, ST25R3911_WUM_PERIDOD_300MS = 0x12, ST25R3911_WUM_PERIDOD_400MS = 0x13, ST25R3911_WUM_PERIDOD_500MS = 0x14, ST25R3911_WUM_PERIDOD_600MS = 0x15, ST25R3911_WUM_PERIDOD_700MS = 0x16, ST25R3911_WUM_PERIDOD_800MS = 0x17 } |
| enum | st25r3911WumAAWeight { ST25R3911_WUM_AA_WEIGHT_4 = 0x00, ST25R3911_WUM_AA_WEIGHT_8 = 0x01, ST25R3911_WUM_AA_WEIGHT_16 = 0x02, ST25R3911_WUM_AA_WEIGHT_32 = 0x03 } |
Functions | |
| void | st25r3911OscOn (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) |
| Turn on Oscillator and Regulator. | |
| void | st25r3911TxRxOn (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) |
| Turn On Tx and Rx. | |
| void | st25r3911TxRxOff (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) |
| Turn Off Tx and Rx. | |
| void | st25r3911Initialize (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) |
| Initialise ST25R3911 driver. | |
| void | st25r3911Deinitialize (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) |
| Deinitialize ST25R3911 driver. | |
| ReturnCode | st25r3911SetBitrate (uint8_t txRate, uint8_t rxRate, 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) |
| Sets the bitrate registers. | |
| ReturnCode | st25r3911AdjustRegulators (uint16_t *result_mV, 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) |
| Adjusts supply regulators according to the current supply voltage. | |
| void | st25r3911MeasureRF (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) |
| Measure RF. | |
| void | st25r3911MeasureCapacitance (uint8_t *result, SPI *mspiChannel, DigitalOut *gpio_cs) |
| Measure Capacitance. | |
| uint16_t | st25r3911MeasureVoltage (uint8_t mpsv, 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) |
| Measure Voltage. | |
| void | st25r3911CalibrateAntenna (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) |
| Calibrate antenna. | |
| void | st25r3911MeasureAntennaResonance (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) |
| Check antenna resonance. | |
| void | st25r3911CalibrateModulationDepth (uint8_t *result, 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) |
| Calibrate modulation depth. | |
| void | st25r3911CalibrateCapacitiveSensor (uint8_t *result, 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) |
| Calibrate Capacitive Sensor. | |
| ReturnCode | st25r3911SetNoResponseTime_64fcs (uint32_t nrt_64fcs, 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 no response time | |
| ReturnCode | st25r3911SetStartNoResponseTime_64fcs (uint32_t nrt_64fcs, DigitalOut *gpio_cs, InterruptIn *IRQ, DigitalOut *fieldLED_06) |
| set no response time | |
| ReturnCode | st25r3911PerformCollisionAvoidance (uint8_t FieldONCmd, uint8_t pdThreshold, uint8_t caThreshold, uint8_t nTRFW, 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) |
| Perform Collision Avoidance. | |
| uint8_t | st25r3911GetNumFIFOLastBits (void) |
| Get amount of bits of the last FIFO byte if incomplete. | |
| uint32_t | st25r3911GetNoResponseTime_64fcs (void) |
| Get NRT time. | |
| void | st25r3911SetGPTime_8fcs (uint16_t gpt_8fcs, 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 general purpose timer timeout | |
| void | st25r3911StartGPTimer_8fcs (uint16_t gpt_8fcs, uint8_t trigger_source, 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) |
| Starts GPT with given timeout. | |
| bool | st25r3911CheckReg (uint8_t reg, uint8_t mask, uint8_t val, 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) |
| Checks if register contains a expected value. | |
| void | st25r3911SetNumTxBits (uint32_t nBits, 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) |
| Sets the number Tx Bits. | |
| bool | st25r3911CheckChipID (uint8_t *rev, 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) |
| Check Identity. | |
| bool | st25r3911IsCmdValid (uint8_t cmd) |
| Check if command is valid. | |
| ReturnCode | st25r3911StreamConfigure (const struct st25r3911StreamConfig *config, 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) |
| Configure the stream mode of ST25R3911. | |
| ReturnCode | st25r3911GetRegsDump (uint8_t *resRegDump, uint8_t *sizeRegDump, InterruptIn *IRQ, DigitalOut *fieldLED_01, DigitalOut *fieldLED_02, DigitalOut *fieldLED_03, DigitalOut *fieldLED_04, DigitalOut *fieldLED_05, DigitalOut *fieldLED_06) |
| Retrieves all internal registers from st25r3911. | |
| bool | st25r3911IrqIsWakeUpCap (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) |
| Cheks if a Wakeup IRQ due to Capacitive measument has happen. | |
| bool | st25r3911IrqIsWakeUpPhase (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) |
| Cheks if a Wakeup IRQ due to Phase measument has happen. | |
| bool | st25r3911IrqIsWakeUpAmplitude (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) |
| Cheks if a Wakeup IRQ due to Amplitude measument has happen. | |
Detailed Description
RFAL ST25R3911 Driver.
Enumeration Type Documentation
| enum st25r3911WumAAWeight |
ST25R3911 Wake-Up Period/Timer
- Enumerator:
Definition at line 153 of file ST25R3911.h.
| enum st25r3911WumPeriod |
ST25R3911 Wake-Up Period/Timer
- Enumerator:
Definition at line 131 of file ST25R3911.h.
Function Documentation
| ReturnCode st25r3911AdjustRegulators | ( | uint16_t * | result_mV, |
| 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 | ||
| ) |
Adjusts supply regulators according to the current supply voltage.
This function the power level is measured in maximum load conditions and the regulated voltage reference is set to 250mV below this level. Execution of this function lasts arround 5ms.
- Parameters:
-
[out] result_mV : Result of calibration in milliVolts.
- Returns:
- ERR_REQUEST : Adjustment not possible since reg_s bit is set.
- ERR_IO : Error during communication with ST25R3911.
- ERR_NONE : No error.
Definition at line 555 of file ST25R3911.cpp.
| void st25r3911CalibrateAntenna | ( | 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 | ||
| ) |
Calibrate antenna.
This function is used to calibrate the antenna using a special sequence. The result is stored in the result parameter.
- Parameters:
-
[out] result,: 8 bit long result of antenna calibration algorithm.
Definition at line 618 of file ST25R3911.cpp.
| void st25r3911CalibrateCapacitiveSensor | ( | uint8_t * | result, |
| 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 | ||
| ) |
Calibrate Capacitive Sensor.
This function is used to calibrates the Capacitive Sensor. The result is stored in the result parameter.
- Parameters:
-
[out] result,: 8 bit long result of antenna calibration algorithm.
| void st25r3911CalibrateModulationDepth | ( | uint8_t * | result, |
| 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 | ||
| ) |
Calibrate modulation depth.
This function is used to calibrate the modulation depth using a special sequence. The result is stored in the result parameter.
- Parameters:
-
[out] result,: 8 bit long result of antenna calibration algorithm.
| bool st25r3911CheckChipID | ( | uint8_t * | rev, |
| 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 | ||
| ) |
Check Identity.
Checks if the chip ID is as expected.
5 bit IC type code for ST25R3911: 00001 The 3 lsb contain the IC revision code
- Parameters:
-
[out] rev : the IC revision code
- Returns:
- true when IC type is as expected
Definition at line 747 of file ST25R3911.cpp.
| bool st25r3911CheckReg | ( | uint8_t | reg, |
| uint8_t | mask, | ||
| uint8_t | val, | ||
| 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 | ||
| ) |
Checks if register contains a expected value.
This function checks if the given reg contains a value that once masked equals the expected value
- Parameters:
-
reg : the register to check the value mask : the mask apply on register value val : expected value to be compared to
- Returns:
- true when reg contains the expected value | false otherwise
Definition at line 736 of file ST25R3911.cpp.
| void st25r3911Deinitialize | ( | 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 | ||
| ) |
Deinitialize ST25R3911 driver.
Calling this function deinitializes the ST25R3911 driver.
Definition at line 545 of file ST25R3911.cpp.
| uint32_t st25r3911GetNoResponseTime_64fcs | ( | void | ) |
Get NRT time.
This returns the last value set on the NRT
- Warning:
- it does not reads chip register, just the sw var that contains the last value set before
- Returns:
- the value of the NRT
Definition at line 710 of file ST25R3911.cpp.
| uint8_t st25r3911GetNumFIFOLastBits | ( | void | ) |
Get amount of bits of the last FIFO byte if incomplete.
Gets the number of bits of the last FIFO byte if incomplete
- Returns:
- the number of bits of the last FIFO byte if incomplete, 0 if the last byte is complete
| ReturnCode st25r3911GetRegsDump | ( | uint8_t * | resRegDump, |
| uint8_t * | sizeRegDump, | ||
| InterruptIn * | IRQ, | ||
| DigitalOut * | fieldLED_01, | ||
| DigitalOut * | fieldLED_02, | ||
| DigitalOut * | fieldLED_03, | ||
| DigitalOut * | fieldLED_04, | ||
| DigitalOut * | fieldLED_05, | ||
| DigitalOut * | fieldLED_06 | ||
| ) |
Retrieves all internal registers from st25r3911.
| void st25r3911Initialize | ( | 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 | ||
| ) |
Initialise ST25R3911 driver.
This function initialises the ST25R3911 driver.
Definition at line 505 of file ST25R3911.cpp.
| bool st25r3911IrqIsWakeUpAmplitude | ( | 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 | ||
| ) |
Cheks if a Wakeup IRQ due to Amplitude measument has happen.
Definition at line 968 of file ST25R3911.cpp.
| bool st25r3911IrqIsWakeUpCap | ( | 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 | ||
| ) |
Cheks if a Wakeup IRQ due to Capacitive measument has happen.
Definition at line 956 of file ST25R3911.cpp.
| bool st25r3911IrqIsWakeUpPhase | ( | 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 | ||
| ) |
Cheks if a Wakeup IRQ due to Phase measument has happen.
Definition at line 962 of file ST25R3911.cpp.
| bool st25r3911IsCmdValid | ( | uint8_t | cmd ) |
Check if command is valid.
Checks if the given command is a valid ST25R3911 command
- Parameters:
-
[in] cmd,: Command to check
- Returns:
- true if is a valid command
- false otherwise
Definition at line 897 of file ST25R3911.cpp.
| void st25r3911MeasureAntennaResonance | ( | 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 | ||
| ) |
Check antenna resonance.
This function is used to measure the antenna LC tank resconance to determine whether a calibration is needed. The result is stored in the result parameter.
- Parameters:
-
[out] result,: 8 bit long result of the measurement.
Definition at line 610 of file ST25R3911.cpp.
| void st25r3911MeasureCapacitance | ( | uint8_t * | result, |
| SPI * | mspiChannel, | ||
| DigitalOut * | gpio_cs | ||
| ) |
Measure Capacitance.
This function performs the capacitance measurement and stores the result in parameter result.
- Parameters:
-
[out] result,: 8 bit long result of RF measurement.
| void st25r3911MeasureRF | ( | 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 | ||
| ) |
Measure RF.
This function measured the amplitude on the RFI inputs and stores the result in parameter result.
- Parameters:
-
[out] result,: 8 bit long result of RF measurement.
Definition at line 594 of file ST25R3911.cpp.
| uint16_t st25r3911MeasureVoltage | ( | uint8_t | mpsv, |
| 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 | ||
| ) |
Measure Voltage.
This function measures the voltage on one of VDD and VSP_* result in parameter result.
- Parameters:
-
[in] mpsv : one of ST25R3911_REG_REGULATOR_CONTROL_mpsv_vdd ST25R3911_REG_REGULATOR_CONTROL_mpsv_vsp_rf ST25R3911_REG_REGULATOR_CONTROL_mpsv_vsp_a or ST25R3911_REG_REGULATOR_CONTROL_mpsv_vsp_d
- Returns:
- the measured voltage in mV
Definition at line 679 of file ST25R3911.cpp.
| void st25r3911OscOn | ( | 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 | ||
| ) |
Turn on Oscillator and Regulator.
This function turn on oscillator and regulator and wait for the oscillator to become stable.
Definition at line 481 of file ST25R3911.cpp.
| ReturnCode st25r3911PerformCollisionAvoidance | ( | uint8_t | FieldONCmd, |
| uint8_t | pdThreshold, | ||
| uint8_t | caThreshold, | ||
| uint8_t | nTRFW, | ||
| 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 | ||
| ) |
Perform Collision Avoidance.
Performs Collision Avoidance with the given threshold and with the n number of TRFW
- Parameters:
-
[in] FieldONCmd : Field ON command to be executed ST25R3911_CMD_INITIAL_RF_COLLISION or ST25R3911_CMD_RESPONSE_RF_COLLISION_0/N [in] pdThreshold : Peer Detection Threshold (ST25R3916_REG_FIELD_THRESHOLD_trg_xx) 0xff : don't set Threshold (ST25R3916_THRESHOLD_DO_NOT_SET) [in] caThreshold : Collision Avoidance Threshold (ST25R3916_REG_FIELD_THRESHOLD_rfe_xx) 0xff : don't set Threshold (ST25R3916_THRESHOLD_DO_NOT_SET) [in] nTRFW : Number of TRFW
- Returns:
- ERR_NONE : no collision detected
- ERR_RF_COLLISION : collision detected
Definition at line 807 of file ST25R3911.cpp.
| ReturnCode st25r3911SetBitrate | ( | uint8_t | txRate, |
| uint8_t | rxRate, | ||
| 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 | ||
| ) |
Sets the bitrate registers.
This function sets the bitrate register for rx and tx
- Parameters:
-
txRate : speed is 2^txrate * 106 kb/s 0xff : don't set txrate rxRate : speed is 2^rxrate * 106 kb/s 0xff : don't set rxrate
- Returns:
- ERR_NONE : No error, both bit rates were set
- ERR_PARAM: At least one bit rate was invalid
Definition at line 644 of file ST25R3911.cpp.
| void st25r3911SetGPTime_8fcs | ( | uint16_t | gpt_8fcs, |
| 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 general purpose timer timeout
This function sets the proper registers but does not start the timer actually
- Parameters:
-
gpt_8fcs : general purpose timer timeout in 8/fc = 590ns
Definition at line 728 of file ST25R3911.cpp.
| ReturnCode st25r3911SetNoResponseTime_64fcs | ( | uint32_t | nrt_64fcs, |
| 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 no response time
This function executes sets the no response time to the defines value
- Parameters:
-
nrt_64fcs : no response time in 64/fc = 4.72us completion interrupt
- Returns:
- ERR_PARAM : if time is too large
Definition at line 769 of file ST25R3911.cpp.
| void st25r3911SetNumTxBits | ( | uint32_t | nBits, |
| 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 | ||
| ) |
Sets the number Tx Bits.
Sets ST25R3911 internal registers with correct number of complete bytes and bits to be sent
- Parameters:
-
nBits : the number bits to be transmitted
Definition at line 890 of file ST25R3911.cpp.
| ReturnCode st25r3911SetStartNoResponseTime_64fcs | ( | uint32_t | nrt_64fcs, |
| DigitalOut * | gpio_cs, | ||
| InterruptIn * | IRQ, | ||
| DigitalOut * | fieldLED_06 | ||
| ) |
set no response time
This function executes sets and immediately start the no response timer to the defines value This is used when needs to add more time before timeout whitout Tx
- Parameters:
-
nrt_64fcs : no response time in 64/fc = 4.72us completion interrupt
- Returns:
- ERR_PARAM : if time is too large
| void st25r3911StartGPTimer_8fcs | ( | uint16_t | gpt_8fcs, |
| uint8_t | trigger_source, | ||
| 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 | ||
| ) |
Starts GPT with given timeout.
This function starts the general purpose timer with the given timeout
- Parameters:
-
gpt_8fcs : general purpose timer timeout in 8/fc = 590ns trigger_source : no trigger, start of Rx, end of Rx, end of Tx in NFC mode
Definition at line 715 of file ST25R3911.cpp.
| ReturnCode st25r3911StreamConfigure | ( | const struct st25r3911StreamConfig * | config, |
| 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 | ||
| ) |
Configure the stream mode of ST25R3911.
This function initializes the stream with the given parameters
- Parameters:
-
[in] config : all settings for bitrates, type, etc.
- Returns:
- ERR_NONE : No error, stream mode driver initialized.
Definition at line 909 of file ST25R3911.cpp.
| void st25r3911TxRxOff | ( | 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 | ||
| ) |
Turn Off Tx and Rx.
This function turns Off Tx and Rx (Field Off)
Definition at line 475 of file ST25R3911.cpp.
| void st25r3911TxRxOn | ( | 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 | ||
| ) |
Turn On Tx and Rx.
This function turns On Tx and Rx (Field On)
Definition at line 470 of file ST25R3911.cpp.
Generated on Tue Jul 12 2022 18:07:56 by
1.7.2