Dear Dai,
I would suggest to use the ST25NFC_Embedded_Lib_ST25R3916_1.4.0\Projects\STM32L476RG-Nucleo\Applications\X-NUCLEO-NFC06A1\FreeRTOS_polling demo from STSW-ST25R016 (ST25 embedded NFC library for ST25R3916 reader and tag products 1.4.0). It is based on the same RFAL version than STSW-ST25RFAL002 (RFAL for ST25R3916ST 2.6.0) but includes an NFC polling demo showing how to use the RFAL API.
Basically, you'll have to include in your project the files from ST25NFC_Embedded_Lib_ST25R3916_1.4.0\Middlewares\ST\RFAL and ST25NFC_Embedded_Lib_ST25R3916_1.4.0\Middlewares\ST\RFAL\source\st25r3916.
In order to use only ISO 15693, you just need to customise the platform.h as follow:
#define RFAL_FEATURE_LISTEN_MODE false /*!< Enable/Disable RFAL support for Listen Mode */
#define RFAL_FEATURE_WAKEUP_MODE false /*!< Enable/Disable RFAL support for the Wake-Up mode */
#define RFAL_FEATURE_LOWPOWER_MODE false /*!< Enable/Disable RFAL support for the Low Power mode */
#define RFAL_FEATURE_NFCA false /*!< Enable/Disable RFAL support for NFC-A (ISO14443A) */
#define RFAL_FEATURE_NFCB false /*!< Enable/Disable RFAL support for NFC-B (ISO14443B) */
#define RFAL_FEATURE_NFCF false /*!< Enable/Disable RFAL support for NFC-F (FeliCa) */
#define RFAL_FEATURE_NFCV true /*!< Enable/Disable RFAL support for NFC-V (ISO15693) */
#define RFAL_FEATURE_T1T false /*!< Enable/Disable RFAL support for T1T (Topaz) */
#define RFAL_FEATURE_T2T false /*!< Enable/Disable RFAL support for T2T */
#define RFAL_FEATURE_T4T false /*!< Enable/Disable RFAL support for T4T */
#define RFAL_FEATURE_ST25TB false /*!< Enable/Disable RFAL support for ST25TB */
#define RFAL_FEATURE_ST25xV true /*!< Enable/Disable RFAL support for ST25TV/ST25DV */
#define RFAL_FEATURE_DYNAMIC_ANALOG_CONFIG false /*!< Enable/Disable Analog Configs to be dynamically updated (RAM) */
#define RFAL_FEATURE_DPO false /*!< Enable/Disable RFAL Dynamic Power Output support */
#define RFAL_FEATURE_ISO_DEP false /*!< Enable/Disable RFAL support for ISO-DEP (ISO14443-4) */
#define RFAL_FEATURE_ISO_DEP_POLL false /*!< Enable/Disable RFAL support for Poller mode (PCD) ISO-DEP (ISO14443-4) */
#define RFAL_FEATURE_ISO_DEP_LISTEN false /*!< Enable/Disable RFAL support for Listen mode (PICC) ISO-DEP (ISO14443-4) */
#define RFAL_FEATURE_NFC_DEP false /*!< Enable/Disable RFAL support for NFC-DEP (NFCIP1/P2P) */
In the FreeRTOS port, we have a dedicated ISR task to manage the ST25R3916 interrupt (see nfcIsrTaskRunner). This task waits for a notification of the ST25R3916 interrupt and calls st25r3916Isr() I believe, a dedicated thread can be used in ThreadX RTOS port for managing the ST25R3916 interrupt. Make sure to implement platformProtectST25RComm and platformUnprotectST25RComm macros (in FreeRTOS, this is a simple enter/exit critical section).
For the timer management, I would suggest to have a look on plfTimerXXX fonction in plf_adaptation.c and try to port in a similar way to ThreadX RTOS.
The main task runs the polling demo initialization and then loops forever on the NFC polling. I believe, it can be ported in a similar way to ThreadX RTOS
Rgds
BT
In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.