2020-07-27 04:15 AM
Hello!
I have been working with the NFC05A1 NFC Reader in combination with a G070RB, but am momentarily stuck on how to use it in my own program.
I have followed all the steps given in an other post with a person having close to the same issue: https://community.st.com/s/global-search/25R3911B?t=1595829552630
But I keep getting errors left and right on includes and functions, which makes me come to a question whether all of this is needed for just a 'simple' program.
My main question here is whether there is an easy way to implement a program to read the UID from an NFC Tag. It's all my program has to do, the example given in the X-CUBE-NFC5 seems a little too much for what I want it to do.
Kind regards,
Joey
Solved! Go to Solution.
2020-08-24 01:52 AM
Hi,
The CS signal is not properly driven: it should be low during a whole frame (e.g. low when sending the 03 03 polling command, in your trace the CS goes high in between). Make sure to have
SPI interface is not properly selected: in your IOC project, the SSI_0/Interface pin is not set. It should be 1 (see table 4 in the ST25R95 DataSheet). Make sure to have PC7 being defined as SSI_0 and being high.
The SPI baud rate is exceeding the max ST25R95 SPI clock frequency. It should not exceed 2Mbits/s (current value is 8...). Make sure to update the presscaler to 8 (==> Mbits/s) or 16 (==> 1 Mbits/s).
Rgds
BT
2020-07-28 01:00 AM
Hi
The examples provided in X-CUBE-NFC5 demonstrate the various features of the ST25R3911B. The polling demo provides a simple way to read the UID of a tags from various technologies and can be reused/modified for customer projects.
Do you use the NUCLEO-G070RB?
Can you elaborate on " keep getting errors left and right on includes and functions," and send your project file so that I check on my side?
Rgds
BT
2020-07-28 01:57 AM
Hello Brian,
Yes I do use the NUCLEO-G070RB.
For getting the errors, there are no specifics. But I can explain them a little bit, I was working with integrating the demo into my own project as told in the other post I linked. But with including and adjusting the files errors kept popping up as either inclusion errors or errors because I changed the pins on certain aspects like the LEDS.
Because I don't have spare pins on the project I am working on, I won't be able to change some pins to mocks or ones that I don't use, simply because I don't have them. Hence the reason I was looking for a simple example with the bare minimum requirements to include, and what functions to use just for reading the UID.
2020-07-28 02:20 AM
Hi
then, you can logically map all the LED on the same GPIO.
If some GPIOs are reused for other purpose, make sure to bend the pin on the CNx connectors to prevent the LEDs from being connected to those GPIOs.
Rgds
BT
2020-07-28 02:44 AM
Ok let me start this over sorry. The main issue isn't the usage of GPIO pins, those were the errors I was getting but when not trying to integrate the entire program it does not really matter.
The main issue is integrating it into my own project with the bare minimums to get the UID. Do you have a list of steps to take, what files to include, changes to make and functions to call to retreive the UID?
Kind regards,
Joey
2020-07-28 02:56 AM
Hi,
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 where I give the various steps.
You can #define platformLedOff/On/Toggle to empty to get rid of the LED pin redefinition/conflict and be able to properly import the demo.
Rgds
BT
2020-07-28 05:29 AM
I will try it again, and I'll let you know if any problems occur!
2020-08-13 01:55 AM
Hello again,
I am now working on porting the NFC03A1 to the G070B Nucleo board, and am running into my first problem, I've tried following the same steps as said in the other post.
Added files from:
I'm trying to just include all the files and resolve any errors I have, but it seems that the "stream_driver.h" file is missing in the entire NFC03A1. I'm using the F1XX example to port to the G070B.
I get the error noted above, but am also curious on how I should configure the SPI, USART and IRQ pins in the .IOC file. I have added my project so someone could possibly check it out.
Kind regards,
Joey
(Edited, wasn't missing the timer.h file, I just had to include the path)
2020-08-14 12:35 AM
Hi Joey,
moving from NFC5->NFC3??
stream_driver.h is not included as not needed. stream_dispatcher.c (used for GUI control by ST25R391x-DISCO) did make it by mistake into the packet. If you exclude it from your project everything should be fine again.
After short review of your ioc: You will also need to foresee connections to IRQ_IN, IRQ_OUT and SPI_SS.
Regards, Ulysses
2020-08-14 02:02 AM
Hi Ulysses,
I was assuming the NFC5 operates in a similar way as the NFC3. On our final product we will most likely use NFC3, but only up until last week had an NFC5 to test on. The only thing I really need to do is read the UID from a card and use that to send it to a server which does all the authentication.
I have added the IRQ_IN, IRQ_OUT and SPI_SS to their respective connections on the NFC03A1. Should I configure IRQ_OUT as a GPIO Output?
I will add my project every time so it's easier to see what's going on when I'm talking about an error. I get undefined references to all the rfalNfc functions from demo.c, what's causing these errors as I have included the rfal folder in the include paths.
Kind regards,
Joey