cancel
Showing results for 
Search instead for 
Did you mean: 

ST25R3911B resource optimization

KOPRO
Associate III

I have a question regarding ST25R3911B resource optimization.

https://www.st.com/resource/en/user_manual/um2890-rfnfc-abstraction-layer-rfal-stmicroelectronics.pdf

Additionally, I have read the RFAL user manual mentioned below, and in the FEATURES CONFIGURATION section, the features appear to be independent of one another. However, I would appreciate it if you could confirm whether there is any dependency among them.

We are only using "RFAL_NFCA_T4T," and we're inquiring about ways to optimize the RFAL library and memory resource as they are currently too large.

It seems that we might need to modify the platform.h, specifically looking to optimize the defines from line 165 to line 185.

We have ported NFC using the ST25R3911B RFAL library.

When we tag an NFC Card and read it through Uart, we intend to use only the "RFAL_NFCA_T4T" mode.

The debug information is as follows:

DEBUG START from UART
===========================
rfalNfcIsDevActivated
RFAL_NFC_LISTEN_TYPE_NFCA
NFCA Passive ISO-DEP device found. UID: 9575FXXX
Select NDEF Application: OK Data: 6A82
===========================
DEBUG END from UART

Our development environment is detailed below:
0. IDE: STM32CubeIDE Ver: 1.11.2
1. Chip: STM32F412RGT6 / 1MB Flash, 256KB RAM
2. Middleware: Uses FreeRTOS / CMSIS_RTOS_V2
3. NFC: ST25R3911B RFAL Library v2.0.10
Porting: Official STM RFAL library for ST25R3911B
V2.0.0 / 27-August-2019
NDEF library changelog
v1.0.4 (July 22nd, 2019)
Tested with RFAL 2.0.10

For our development environment, the ported platform.h can be found in the attachment "platform.h."
We would greatly appreciate any advice on how to minimize the defines from line 165 to line 185 as much as possible.

Thank you.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Brian TIDAL
ST Employee

Hi,

if your application uses only RFAL_NFCA_T4T, then the discParam.techs2Find can be limited to RFAL_NFC_POLL_TECH_A when initializing the discParam and the RFAL_FEATURE flags should be:

#define RFAL_FEATURE_LISTEN_MODE               false  
#define RFAL_FEATURE_WAKEUP_MODE               false 
#define RFAL_FEATURE_NFCA                      true   
#define RFAL_FEATURE_NFCB                      false
#define RFAL_FEATURE_NFCF                      false  
#define RFAL_FEATURE_NFCV                      false  
#define RFAL_FEATURE_T1T                       false  
#define RFAL_FEATURE_T2T                       false  
#define RFAL_FEATURE_T4T                       true   
#define RFAL_FEATURE_ST25TB                    false  
#define RFAL_FEATURE_ST25xV                    false  
#define RFAL_FEATURE_DYNAMIC_ANALOG_CONFIG     false  
#define RFAL_FEATURE_DPO                       false  
#define RFAL_FEATURE_ISO_DEP                   true   
#define RFAL_FEATURE_ISO_DEP_POLL              true   
#define RFAL_FEATURE_ISO_DEP_LISTEN            false  
#define RFAL_FEATURE_NFC_DEP                   false  

Make sure to not mix RFAL versions

BrianTIDAL_0-1711702020915.png

I may misunderstand but it sounds strange to mix v2.0.0 and v2.0.10

Note that v2.0.10 is quite old. You can find more recent code with polling and NDEF demos in the ST25 embedded NFC library (ST25R3911B package: STSW-ST25R015)

Note as well that a FreeRTOS demo is available in the ST25 embedded NFC library for ST25R3916. This can help you for your port of ST25R3911B on FreeRTOS.

Also:

BrianTIDAL_1-1711702614195.png

this tag does not support NDEF.

 

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.

View solution in original post

3 REPLIES 3
KOPRO
Associate III

And I also conducted tests by copying and pasting the defines found at the URL mentioned below in the same manner. However, despite tagging the NFC card, it was not read at all.

https://community.st.com/t5/st25-nfc-rfid-tags-and-readers/how-to-reduce-flash/m-p/71962


#define RFAL_FEATURE_LISTEN_MODE true /*!< 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_NFCA true /*!< 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 false /*!< Enable/Disable RFAL support for NFC-V (ISO15693) */
#define RFAL_FEATURE_T1T true /*!< Enable/Disable RFAL support for T1T (Topaz) */
#define RFAL_FEATURE_T2T true /*!< Enable/Disable RFAL support for T2T */
#define RFAL_FEATURE_T4T true /*!< Enable/Disable RFAL support for T4T */
#define RFAL_FEATURE_ST25TB false /*!< Enable/Disable RFAL support for ST25TB */
#define RFAL_FEATURE_ST25xV false /*!< 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_DYNAMIC_POWER false /*!< Enable/Disable RFAL dynamic power support */
#define RFAL_FEATURE_ISO_DEP true /*!< Enable/Disable RFAL support for ISO-DEP (ISO14443-4) */
#define RFAL_FEATURE_ISO_DEP_POLL true /*!< 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 true /*!< Enable/Disable RFAL support for NFC-DEP (NFCIP1/P2P) */

 

Brian TIDAL
ST Employee

Hi,

if your application uses only RFAL_NFCA_T4T, then the discParam.techs2Find can be limited to RFAL_NFC_POLL_TECH_A when initializing the discParam and the RFAL_FEATURE flags should be:

#define RFAL_FEATURE_LISTEN_MODE               false  
#define RFAL_FEATURE_WAKEUP_MODE               false 
#define RFAL_FEATURE_NFCA                      true   
#define RFAL_FEATURE_NFCB                      false
#define RFAL_FEATURE_NFCF                      false  
#define RFAL_FEATURE_NFCV                      false  
#define RFAL_FEATURE_T1T                       false  
#define RFAL_FEATURE_T2T                       false  
#define RFAL_FEATURE_T4T                       true   
#define RFAL_FEATURE_ST25TB                    false  
#define RFAL_FEATURE_ST25xV                    false  
#define RFAL_FEATURE_DYNAMIC_ANALOG_CONFIG     false  
#define RFAL_FEATURE_DPO                       false  
#define RFAL_FEATURE_ISO_DEP                   true   
#define RFAL_FEATURE_ISO_DEP_POLL              true   
#define RFAL_FEATURE_ISO_DEP_LISTEN            false  
#define RFAL_FEATURE_NFC_DEP                   false  

Make sure to not mix RFAL versions

BrianTIDAL_0-1711702020915.png

I may misunderstand but it sounds strange to mix v2.0.0 and v2.0.10

Note that v2.0.10 is quite old. You can find more recent code with polling and NDEF demos in the ST25 embedded NFC library (ST25R3911B package: STSW-ST25R015)

Note as well that a FreeRTOS demo is available in the ST25 embedded NFC library for ST25R3916. This can help you for your port of ST25R3911B on FreeRTOS.

Also:

BrianTIDAL_1-1711702614195.png

this tag does not support NDEF.

 

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.

Hello,

Based on your response,

I ported the project using the latest FreeRTOS version 1.5 source,

and I have confirmed that it is working properly.

Thank you.