2023-05-08 03:48 AM
Hi there,
I am a beginner of using customize board to build a project for reading a ISO 144443-4 card . The project demo(polling) that I search in previous post is using a different MCU. Also, I read the rfal_platform header file. It is using the SPI communication. Is it possible to configurate it using I2C communication?
First question, Am I supposed to use the ISO_DEP feature to read the card?
Second question , I know that I need to configure the GPIO , interrupt pin and the serial communication interface (SPI,I2C....). how can I initialize the St25r3917? What steps or functions must include in initialize process?
Third question, If I am only reading the card UID ,which project or example I should take it as a reference and what command I should use for reading the card or how can I adjust from the existing project to build the Functionality? Based on my understanding of the RFAL document ,I think I only need to achieve the polling to screen the card UID.
Thanks a lot
Regards, Kin Hong
2023-05-09 01:22 AM
Hi Kin Hong,
yes 14443-4 cards require IOSEP for higher layer commands. Yes, please see the UM of RFAL, define RFAL_USE_I2C to switch to I2C. RFAL for ST25R3916(B) supports also the ST25R3917. Please see the demos available from ST25 Embedded NFC lib.
UID is part of Anticollision, so for that you would not need ISODEP. Use the simple X-NUCLEO-NFC06A1/polling demo to retrieve the UID.
BR, Ulysses
2023-05-09
03:04 AM
- last edited on
2023-12-06
05:04 AM
by
Laurids_PETERSE
Sorry, How can I initialize the RFAL of st25r3917 and build the functionality? I have set the IRQ pin, scl ,sda pin and I2C_EN (VDD) for the st25r3917 and connect it to stm32L452CCU6 .I am now using I2c1 PA10 , PA9 and the IRQ pin PB6 on stm32L452CCU6 and ,I try to follow the polling example but I cannot initialize the rfal using the command rfalNfcInitialize() .Here is some of my code and tera term log message as well as the pin assignment of STM32L452CCU6.Thank you for your time and reply.
Thanks a lot
Regards, Kin Hong
2023-05-09 03:50 AM
Hi,
enable ST25R_SELFTEST and debug through into the st25r3916Initialize(). There you should find a function reading and testing the ST25R3917 chip id. See that it calls I2C driver with correct data...
Also make sure that the I2C_EN pin is properly tight on your board.
Regards, Ulysses
2023-05-09 08:00 PM - edited 2023-11-20 06:05 AM
Hi
Do you mean that I have to use the SS pin to control the I2C_EN pin? Because Now I use a jumper to connect the I2C_EN to Vdd. I try your method to debug through into st25r3916initialize() and it get stuck at reading the chip id function . it can not read the chip id and ic identity register. I have tried to read the identity register using different method with the same hardware configuration. It returns 0x31 instead of 0x2A claimed in datasheet. Beside, I want to know Do I need to configurate the pin for I2C in the rfal_platform.h ? Some of picture is attached to show what problem I am dealing with. Thank you for your time and reply. Thanks a lot.
Regards,Kin Hong
2.using the api function to read the ic identity register and the result.
3.The default value of the IC identity register =0x2Ah
4.The pin configuration in rfal_platform.h
2023-05-10 12:32 AM
Hi,
I see here:
Regards, Ulysses
2023-05-11 12:30 AM - edited 2023-11-20 06:05 AM
I get the development kit and use the GUI to read the IC Identity register and it give me 0x31 not 0x2A claimed in datasheet.Now I have changed the default IC Identity register to 0x31 and it is working. I can now initialize the i2c and the st25r3917. I think the information in the data sheet is wrong.
Best regards,
Kin Hong
2023-05-11 12:54 AM
Hi,
I checked the value 0x31: This value does not belong to ST25R3916/7 but to ST25R3916B/ST25R3917B. This is a different chip. RFAL supports this newer variant as well by setting the define ST25R3916B.
Please check the marking on the chip - it should have a B marking....
Regards, Ulysses
2023-05-11 11:24 PM - edited 2023-11-20 06:06 AM
Hi
thank you .I now realize that the rfid sensor we are using is st25r3917b .Sorry for that.But Now I have encountered a problem which is the nfc polling always stuck at the discovery state 2 even I put the card on top of the antenna , it cannot read the uid for me.I am using the exampleRfalNfca.c. Also I am using custom board of stm32l452ccu6 and the rfid jumper board of STEVAL-25R3916B which already soldered it as i2c mode, all power supply pin, i2c pin and the interrupt pin has connected do u have any idea how to solve this problem.Beside in st25r3916PerformCollisionAvoidance function it return me 12 as a error value.How can I solve this Thanks alot.
regards, Kin Hong
2023-05-12 02:53 AM - edited 2023-11-20 06:06 AM
HI
I think there is a problem with the rfalNfcaPollerTechnologyDetection() also ,it return me error code 3 and I think it is supposed to be RFAL_ERR_NONE(0) so the program cannot perform the protocol specific activation. I am using the exampleRfalNfca.c and I also check out the error code in rfal_utils.h but I don't know how to resolve the error. Do you have any idea how to solve the problem? thanks a lot
Regards,Kin Hong