Skip to main content
Visitor II
September 1, 2020
Solved

I am not able to find proper examples and/or documentation on how to add RAFL to my project.

  • September 1, 2020
  • 7 replies
  • 3850 views

I am not able to find proper examples and/or documentation on how to add RAFL to my project.

Looking into the rfal.chm file in RFAL there is an example but it does not work for me ?

When I am looking in X-CUBE-NFC5.chm there should 4 examples but its empty.

The documentation for how to add it to a project is limited.

Is there a source code for the ST25R3911B discovery GUI or even better documentation for it as well.

Thanks,

Noam.

    This topic has been closed for replies.
    Best answer by Brian TIDAL

    HI,

    thanks for having highlighted the issue with X-CUBE-NFC5.chm file. I will report this issue internally. As a workaround, the 4 examples can be found in rfal.chm and ndef.chm files.

    Can you share more information about your hardware setup: is it based on X-NUCLEO-NFC05A1 or on ST25R3911B-DISCO? Which MCU (STM32L4 or other)?

    "Beside the above nothing happens." This is issue is likely that the st25r3911b interrupt service routine is not called when the IRQ_3911B is triggered. Some functional example for bare metal are provided in STM32CubeExpansion_NFC5_V2.0.0\Projects\STM32L476RG-Nucleo\Applications\PollingTagDetect where one can see the IRQ_3911B interrupt execution model. Also, we can share with you a functional freeRTOS example running on NUCLEO-L476RG+X-NUCLEO-NFC05A1. In the freeRTOS example, an ISR task is waiting for the interrupt to happen and then run the st25r3911Isr(). I believe the PC GUI source code will not be a big help on this issue.

    STM32CubeExpansion_NFC5_V2.0.0\Projects\STM32L476RG-Nucleo\Applications\PollingTagDetect contains a full demo running on X-NUCLEO-NFC05A1. I believe this is a good basis for starting with NFC.

    Rgds

    BT

    7 replies

    Technical Moderator
    September 1, 2020

    Hi,

    which version of X-CUBE-NFC5 do you have? On my side, I have the V2.0.0 and X-CUBE-NFC5.chm provides 2 examples which are not empty (see attached screen shot)

    X-CUBE-NFC5 includes ready to build projects for various Nucleo boards (see STM32CubeExpansion_NFC5_V2.0.0\Projects\STM32L476RG-Nucleo\Applications\PollingTagDetect for polling loop on NUCLEO-L476)

    See https://community.st.com/s/question/0D53W000006G1H9SAK/how-to-start-with-st25r3911b-and-is-it-really-necessary-to-use-rfal-and-st25r3911-libraries-for-simpel-project on the same topic for detailed steps to include the RFAL in your project.

    The source code for the ST25R3911B-DISCO is available here: https://www.st.com/en/evaluation-tools/st25r3911b-disco.html#tools-software (--> STSW-ST25R002)

    Rgds

    BT

    NWeis.19Author
    Visitor II
    September 2, 2020

    Dear Brian,

    I was referring to X-CUBE-NFC5 Expansion for STM32Cube v2.0.0

    0693W000003QW4OQAW.png

    In the RFAL.chm file there are two examples as you noted above.

    In rfal.chm document (RF Abstraction Layer) there is a flow describing how to modify the platform.h file.

    I was able to edit the platform.h file, define interrupt lines and all. I created a task (we run FreeRTOS) that does more

    or less the flow in exampleRfalPoller.c

    The code runs and I see that it runs in the state machine:

    gState = EXAMPLE_RFAL_POLLER_STATE_INIT

    gState = EXAMPLE_RFAL_POLLER_STATE_TECHDETECT

    gState = EXAMPLE_RFAL_POLLER_STATE_DEACTIVATION

    and now clear ... and again and again.

    Beside the above nothing happens.

    I am new to NFC and related and I find the documentation very poor. The example on the Disco board works fine together with the PC GUI.

    But and here is the big issue... There is no (did not find) documentation or source code for the PC GUI.

    I cannot easily add or remove modules with doing a lot of reading and digging into the code.

    I feel that I need to do reverse engineering if I want to work with a chip by ST. I do not think that this is what you think your user need to do.

    I would expect more samples and much better documentation telling the user add these files and do this and that...

    If you can share other documentation and or examples that are not found on the ST25R3911 pages it would be great.

    Thanks,

    Noam.

    Technical Moderator
    September 2, 2020

    HI,

    thanks for having highlighted the issue with X-CUBE-NFC5.chm file. I will report this issue internally. As a workaround, the 4 examples can be found in rfal.chm and ndef.chm files.

    Can you share more information about your hardware setup: is it based on X-NUCLEO-NFC05A1 or on ST25R3911B-DISCO? Which MCU (STM32L4 or other)?

    "Beside the above nothing happens." This is issue is likely that the st25r3911b interrupt service routine is not called when the IRQ_3911B is triggered. Some functional example for bare metal are provided in STM32CubeExpansion_NFC5_V2.0.0\Projects\STM32L476RG-Nucleo\Applications\PollingTagDetect where one can see the IRQ_3911B interrupt execution model. Also, we can share with you a functional freeRTOS example running on NUCLEO-L476RG+X-NUCLEO-NFC05A1. In the freeRTOS example, an ISR task is waiting for the interrupt to happen and then run the st25r3911Isr(). I believe the PC GUI source code will not be a big help on this issue.

    STM32CubeExpansion_NFC5_V2.0.0\Projects\STM32L476RG-Nucleo\Applications\PollingTagDetect contains a full demo running on X-NUCLEO-NFC05A1. I believe this is a good basis for starting with NFC.

    Rgds

    BT

    NWeis.19Author
    Visitor II
    September 2, 2020

    Dear Brian,

    Our hardware consists of the STM32WB55xx as the host CPU running FreeRTOS, we also have a motor controller STSPIN32F0 etc....

    We use the ST25R3911B with our own design, based on the disco evaluation etc...

    Our hardware has two identical units. We need to detect that they are close to each other and after that use the P2P protocol

    to transfer some data between the master and slave units.

    That is all

    BR,

    Noam.

    Technical Moderator
    September 15, 2020

    ​FreeRTOS example sent in private.

    Visitor II
    October 7, 2020

    Hi Brian,

    I use the same stm32WB (with freeRTOS) with the same ST25R3911B

    Please send me the examples to my private account

    Thanks In Advance,

    Micha

    Visitor II
    December 16, 2020

    Hi Brian,

    Kindly reminder, please send me in private the freeRTOS example for ST25R3911B

    Thanks In Advance,

    Micha

    Visitor II
    December 16, 2020

    Hey Brian,

    Do you have a freeRTOS example for a free workspace and not for Keil?

    Technical Moderator
    December 16, 2020

    Hi Amit,

    the freeRTOS package for ST25R3911B is delivered with Keil project files but it can be easily ported to other IDE. We can provide it to you in private if you want.

    Rgds

    BT

    Visitor II
    January 10, 2021

    Hi Brian,

    Same Same,

    I'll be glad to receive the freeRTOS package for ST25R3911B & ST25R3916 ported to ST32CubeIDE

    Best Regards,

    Micha

    Technical Moderator
    January 11, 2021

    Hi Micha,

    the freeRTOS package for ST25R3916 is available in the ST25 Embedded NFC library (STSW-ST25R016). This runs on NUCLEO-STM32L476RG MCU and the project can be compiled with STM32CubeIDE.

    Regarding the ST25R3911B, the freeRTOS package is not publicly available and it has not been ported on STM32CubeIDE. Anyway, it should be easy to reuse the STM32CubeIDE FreeRTOS package from ST25R3916 and to port it on ST25R3911B. Note that the ST25R3911B has more timing constraints regarding the processing of its interrupt.

    Rgds

    BT

    Visitor II
    December 16, 2020

    Brian thanks for the quick response.

    I already got the Keil project (I am working with @NWeis.19​  at the same team).

    We tried to port it to system work bench and Atollic true studio but both of those didn't get so smooth and yield include and compiling issues at the CMSIS layer.

    So the situation now is that we kinda stuck with it without a Keil license.

    Is there a way you can help us with porting it?

    Technical Moderator
    December 17, 2020

    Hi Amit

    I would recommend to use STM32CubeIDE rather than SystemWorkbench or TrueStudiio.

    Then I suggest the following:

    • create the STM32CubeIDE project skeleton thanks to STM32CubeMX (I can provide the ioc file if not in the package)
    • import the various RFAL files into the project, also import spi.c logger.c and timer.c convenient files
    • port the various modifications from the package in main.c and stm32l4xx_it.c (EXTI0_IRQHandler)

    Rgds

    BT