cancel
Showing results for 
Search instead for 
Did you mean: 

ST25R3911B - which ST software package/library?

BenMack99
Senior

Hi All

I am developing a simple app for a bespoke board using the ST25R3911B, that just has to poll for an ST25DV04KC Type 5 tag, and read/write using NDEF. I'm using STM32CubeIDE, adding NFC to an existing project that uses FreeRTOS, and already has the basic hardware init, debug logging etc.

Just checking which is the quickest way to get started?

I think my options are:-

X-CUBE-NFC6 - easy to add to my project using cube, but not clear if it supports ST25R3911B (my understanding is the ST25R3911B is a cut down version of ST25R3916?).

X-CUBE-NFC5 - clearly supports ST25R3911B but doesn't appear in cube, is it superceded by NFC6?

STSW‑ST25R015 - again clearly supports ST25R3911B, but I've not used this style of ST library before, looks like a lot more work to get started, compared to X-CUBE packages

I must admit I get fairly confused by these various ST software packages, and the best/easiest way to add them to an existing STM32CubeIDE project. For example, if using X-CUBE, should I use (and modify) the board extension stuff, or write my own from scratch?

Any pointers gratefully received. Many thanks, Ben

This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
1 ACCEPTED SOLUTION

Accepted Solutions
Brian TIDAL
ST Employee

Hi Ben,

ST25R3911B and ST25R3916 are 2 different products with different register maps and different features.

X-CUBE-NFC6 is dedicated to ST25R3916 family (i.e. ST25R3916, ST25R3916B, ST25R3917, etc.) and is fully integrated in STM32CubeMX.

X-CUBE-NFC5 is dedicated to ST25R3911B family (i.e. ST25R3911B, ST25R3912, ...,  ST25R3915) and is a standalone package. It provides ready to use demos (polling, NDEF read/write) for some MCU nucleo boards based on NFC RF Abstraction Layer (aka RFAL).

STSW‑ST25R015 provides several demos including the polling demo and the NDEF demo. It is based on updated RFAL library. I would recommend to based your development on top of this package. Several posts on this community explain how to port those demos on a different MCU. Basically, thanks to STM32CubeMX, configure the SPI, leds and ST25R3911B IRQ pins. Import the RFAL middleware files in your project and configure the IRQ handler (EXTI0_IRQHandler) to call the st25r3911Isr(). Add the various initializations from demos and add the cycle loop.

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

4 REPLIES 4
Brian TIDAL
ST Employee

Hi Ben,

ST25R3911B and ST25R3916 are 2 different products with different register maps and different features.

X-CUBE-NFC6 is dedicated to ST25R3916 family (i.e. ST25R3916, ST25R3916B, ST25R3917, etc.) and is fully integrated in STM32CubeMX.

X-CUBE-NFC5 is dedicated to ST25R3911B family (i.e. ST25R3911B, ST25R3912, ...,  ST25R3915) and is a standalone package. It provides ready to use demos (polling, NDEF read/write) for some MCU nucleo boards based on NFC RF Abstraction Layer (aka RFAL).

STSW‑ST25R015 provides several demos including the polling demo and the NDEF demo. It is based on updated RFAL library. I would recommend to based your development on top of this package. Several posts on this community explain how to port those demos on a different MCU. Basically, thanks to STM32CubeMX, configure the SPI, leds and ST25R3911B IRQ pins. Import the RFAL middleware files in your project and configure the IRQ handler (EXTI0_IRQHandler) to call the st25r3911Isr(). Add the various initializations from demos and add the cycle loop.

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.

Excellent, many thanks Brian for your quick reply, most helpful

A brief update, I've got the basics working using STSW‑ST25R015 and the example demo_polling.c, following the steps Brian suggested, plus his reply on this thread 

A few tips for others:-

Importing the RFAL middleware - I copied the files over by hand, then fell foul of this cubemx "feature"
when I ran cubemx it deleted the entire middlewares folder because I hadn't used cubemx to import it.
So I moved it to an "RFAL" folder off root, updated project include and source paths
- c/c++ build - settings - compiler - include paths
- c/c++ general - paths and symbols - source location

I copied the "st25r_common" files logger.c spi.c timer.c to my core source folder, as I will be replacing them later, along with rfal_platform.h

I added to proj - c settings - compiler - preprocessor - define symbols (-D) USE_LOGGER, ST25R3911

Then there's a bunch of other tweaks needed, such as sorting _Error_Handler, IRQ handler, etc.

It now builds, runs, and reads tags - success! Thanks again @Brian TIDAL 

well done!

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.