2020-05-06 12:46 PM
Hello everybody!
In my company We decided to use ST brand for our "NFC projects". Anyway, now I have Nucleo board 32f070RB and x-nucleo-NFC05a1 with ST25R3911B chip.
For now We have a simple project, just to read and write to/from the Tag (some of the classical tags, probably ISO14443A).
Unfortunately, there is no official Excample for x-nucleo-05a1 and 32F070RB. For now I just established SPI communication with microcontroller and 25R3911B chip(basic read/ write into a register).
Now I need a help because I confused about 2 things and If It's possible to answer me:
+ What is the steps to Initialize ST25R3911B and start communicate with Tag (I read a datasheet but it's a bit confusing for me)?
+ Is it necessary to use rfal and/or st25r3911 libraries or at list which is really necessary?
All the best,
Domen
Solved! Go to Solution.
2020-05-07 05:12 AM
Hi,
UM2253 (Getting started with the X-CUBE-NFC5 high performance HF reader / NFC initiator IC software expansion for STM32Cube) gives some informations about the RFAL architecture and about how to use the various sample applications.
Also, the X-CUBE-NFC5 comes with Documentation folder that contains the API documentation and examples
Regarding the porting to NUCLEO-F401RE, I would suggest you port the poller application. As explained earlier, I would suggest you use STM32CubeMX to configure the SPI and the various GPIOs:
Then you just need to copy the /* USER */ parts of the main.c (and add st25r3911Isr() in EXTI0_IRQHandler) and update the platform.h with the pin mapping
I've attached the the NUCLEO-L476RG ioc for reference.
Rgds
BT
2020-05-07 01:02 AM
Hi,
the RFAL provides all the necessary steps to initialize the ST25R3911B reader. It provides as well the NFC communication stack. A RFAL port to NUCLEO-F401RE, NUCLEO-L053R8 or NUCLEO-L476RG board in available as part of X-CUBE-NFC5. This includes sample applications (poller and ndef read/write). This can bee reuse for a port to NUCLEO-F070RB.
To port to NUCLEO-F070RB, you just need:
Rgds
BT
2020-05-07 01:52 AM
Hi Domen,
theoretically it would be possible to also omit the RFAL but depending on what you are pursuing it may cause you rewriting parts of RFAL. Reasons:
If you still want to pursue your own drivers then I would start by observing the sequences and registers settings using Logic Analyzer and Register map using ST25R3916-DISCO and try to cherry-pick the parts and settings you actually need. But the more flexible solution is for sure using RFAL as it supports all the modes and technologies which you may need also in future. Also we are frequently updating the RFAL and using it you can rely on using an implementation which is known to pass relevant NFC Standards in our labs. We even went the effort for applying official NFC Forum certification:
Best Regards, Ulysses
2020-05-07 02:18 AM
Thank you for all the time you guys spent to answer me.
You convinced me to use RFAL library :)
Now I have a question, if there is any Documents with how to start using RFAL library in your own project or I need to watch the example and following the written command and use it in my project?
All the best,
Domen
2020-05-07 05:12 AM
Hi,
UM2253 (Getting started with the X-CUBE-NFC5 high performance HF reader / NFC initiator IC software expansion for STM32Cube) gives some informations about the RFAL architecture and about how to use the various sample applications.
Also, the X-CUBE-NFC5 comes with Documentation folder that contains the API documentation and examples
Regarding the porting to NUCLEO-F401RE, I would suggest you port the poller application. As explained earlier, I would suggest you use STM32CubeMX to configure the SPI and the various GPIOs:
Then you just need to copy the /* USER */ parts of the main.c (and add st25r3911Isr() in EXTI0_IRQHandler) and update the platform.h with the pin mapping
I've attached the the NUCLEO-L476RG ioc for reference.
Rgds
BT
2020-05-07 02:43 PM
I'm trying to adjust this official example to be able run in my nucleo 32F070RB like you said above. I generated project in STM32CubeM and set all the pins. But now I have a problem, how and which files to import for "rfal" library and which other files need to be imported.
Could you try to answer me.
All the best,
Domen
2020-05-11 12:47 AM
Hi,
you just need to add the files from the following groups (see the various project files provided in the X-CUBE-NFC5:(
In your application/User group, add
Rgds
BT
2020-05-11 03:52 AM
Hi, thank you for list of files that need tobe included.
I generated project in STM32CubeMX, copy and include all the files in your list and add "Additional include directories"and "Defined symbols" like it is in STM32L476RG-Nucleo project.
Now I have two problems:
I would be very happy with any answer.
All the best,
Domen
2020-05-11 04:09 AM
Hi,
Rgds
BT
2020-05-11 05:23 AM
Hello,
I did it like you said, bu now I have some errors:
Fatal Error[Pe003]: #include file "C:\Users\Domen\Desktop\prilagoditevNFC\Inc\platform.h" includes itself C:\Users\Domen\Desktop\prilagoditevNFC\Drivers\BSP\Components\ST25R3911\timer.h 42
Fatal Error[Pe1696]: cannot open source file "ndef_poller.h" C:\Users\Domen\Desktop\prilagoditevNFC\Middlewares\ST\ndef\Src\poller\ndef_t3t.c 44
Any ideas how to solved, especialy first one ?
All the best,
Domen