STSW-ST25R-LIB
A modified STMicroelectronics library for ST25R3911B, ST25R3916 and ST25R95.
There are many libraries for NFC. The STSW-ST25R-LIB was chosen as the core library with the option to integrate beneficial changes from the other libraries.
STSW-ST25RFAL (v2.6.0)
Components:
- STSW-RFAL001: ST25R3911B
- STSW-RFAL002: ST25R3916
- STSW-RFAL003: ST25R95
This library contains just the RFAL (RF Abstraction Layer) found in STSW-ST25R-LIB. It is probably not needed unless the STSW-ST25R-LIB RFAL is lagging behind in versions.
STSW-ST25R-LIB (v1.4.0)
https://www.st.com/en/embedded-software/stsw-st25r-lib.html
Components:
- STSW-ST25R015: ST25R3911B
- STSW-ST25R016: ST25R3916
- STSW-ST25R017: ST25R95
This library contains mostly the same files as STSW-ST25RFAL but has BSP (Board Support Packages), an NDEF layer and some project examples.
Notably, it has extra features:
- Card emulation (
st25r95_com_ce.c
) - ST25FTM (Fast Transfer Mode)
- ST25Tags support (dynamic NFC tags)
Additional notes:
-
Drivers/BSP/Components/ST25DV
is for communicating with the ST25 dynamic tags via I2C whileMiddlewares/ST/ST25Tags
is for communicating with ST25 dynamic tags via NFC. - Headers (
*.h
files) that appear in a src/source folder are part of a private interface and should not be directly used in application code. Headers in an inc/include folder are part of a public interface and can be used in application code. However, both folders need to be part of the include path for compilation.
X-CUBE-NFC
- X-CUBE-NFC1: X-NUCLEO-NFC01A1 / M24SR
- X-CUBE-NFC2: X-NUCLEO-NFC02A1 / M24LR
- X-CUBE-NFC3: X-NUCLEO-NFC03A1 / CR95HF
- X-CUBE-NFC4: X-NUCLEO-NFC03A1 / ST25DV Dynamic NFC IC
- X-CUBE-NFC5: ST25R3911B
- X-CUBE-NFC6: ST25R3916
- X-CUBE-NFC7: ST25R3916 / Dynamic Tag Support
Missing:
- ST25DV (dynamic tag via I2C) BSP
- NFC04 and NFC06A BSP
- Several NDEF record types
- ST25FTM (Fast Transfer Mode) Support
- ST25Tags (dynamic tag via RFAL) support
Additional notes:
- X-CUBE-NFC uses
Drivers/BSP/Components/ST25R*
for chip driver while STSW-ST25RFAL usesMiddlewares/ST/RFAL/source/st25r*
. The BSP is designed to support a specific PCB layout. The structure in STSW-ST25RFAL is preferred. - X-CUBE-NFC implements NDEF types
ndef_types_mime
andndef_types_rtd
differently to STSW-ST25R-LIB. The STSW-ST25R-LIB is more recent and thus is the preferred option. - X-CUBE-NFC library has oudated docs compared to STSW-ST25R-LIB.
Templates
Headers that (1) include the name _template
or (2) are not in an inc/include or
src/source folder, are considered as templates and should be copied into the
application code inc/include folder where they can be edited for the specific application.
Drivers/BSP/NFC06A1/nfc03a1_conf_template.h
Drivers/BSP/NFC06A1/nfc04a1_conf_template.h
Drivers/BSP/NFC06A1/nfc06a1_conf_template.h
Middlewares/ST/NDEF/include/ndef_config.h
Middlewares/ST/NDEF/include/ndef_config_custom.h
Middlewares/ST/RFAL/include/platform_template_st25r95.h
Middlewares/ST/RFAL/include/platform_template_st25r3911.h
Middlewares/ST/RFAL/include/platform_template_st25r3916.h
Middlewares/ST/ST25FTM/st25ftm_config_template.h
Note that the rfal_features.h
header is not a template. It contains boolean flags
for the capabilities of the RFAL library for a particular chip. Do not attempt to
"disable" or "enable" features by modifying this file as these flags do not change
the functionality of the library. They should be considered as readonly. Instead,
the platform.h
file (create from a template) can be used to enable or disable
the features provided by a particular chip.
Library Modifications
Additional features
- Added PDF docs
- Added BSP for NFC03A1 dev board
- Added more polling intervals for interrupt card detection
- Support for SWO logging
Bug fixes
- Fix bug in RFAL for st25r95 where hard coded wakeup period was used
- Fix bug in
st_errno.h
where missing stint header gave compilation errors.