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-12 04:49 AM
Hi,
error code 3 is ERR_IO - typically returned when unexpected things are happening - likely interrupts are not properly detected and timeout is hit.
Did you enable ST25R_SELFTEST and goes initialization through?
Please check state if interrupt pin, see ISR being triggered, check your platform*Protect*() macros to see if e.g. interrupts stay disabled by mistake.
Which software packet and version do you use as base? Recent packages (e.g. X-CUBE-NFC6 or ST25 Embedded NFC lib) are using the new rfal_nfc high layer and this removes the need of the code from exampleRfalNfca.c.
Best Regards, Ulysses
2023-05-14 07:49 PM
Hi
Thank you for the reply. I do go through the initialization and it work .Also I think the rfalInitialize() have the dependency on the st25r3916Initialize, I am using X-NUCLEO-NFC06A1 as my base.Sorry, may I ask what is the code or anything I needed to add to get it work.Also,even I use the demopolling example ,it is not working.
Best Regards,
Kin Hong
2023-05-14 10:44 PM - edited 2023-11-20 06:07 AM
HI
here is my cube mx setting and some function related to the irq handle and because now I am using pb6 gpio pin 6 as the irq pin so I change the default irq pin to gpio pin 6. thanks a lot
Best Regards,
Kin Hong
2023-05-14 11:14 PM
2023-05-15 01:17 AM
2023-05-15 03:46 AM
Hi,
two points:
BR, Ulysses
2023-05-15 04:05 AM - edited 2023-11-20 06:08 AM
Hi
for now I think I don't have the err_io problem but the intern error still exist.I can initialize the chip and go to idle state and discovery state and go to RFAL_NFC_STATE_POLL_TECHDETECT function but it return me a intern error after the rfalNfcPollTechDetetection(); .As you said before the new rfal_nfc high layer may removes the need of the code from exampleRfalNfca.c.so now I am using the polling example again .
Best regards,
Kin Hong
(1) if the initialization success , the log will print out the initializing.
2023-05-15 06:32 AM
Hi,
st25r3916WaitForInterruptsTimed() returning a status of 0 is not normal behavior. Please debug into that. When it returns this way put a breakpoint and check level of INT line, see if the interrupt in MCU is masked or not, .... I don't have the details of STM32L452 to give you the solution out of the blue.
And still a logic analyzer trace will tell a lot.
Best Regards, Ulysses
2023-05-16 11:28 PM - edited 2023-11-20 06:08 AM
Hi
I am now adding a breakpoint to the st25r3916WaitForInterruptsTimed() function and i have took a photo of the oscilloscope .Can you help me to take a look of what question it is and how can I solve the problem?Beside,what is the normal behavior of the status of st25r3916WaitForInterruptsTimed() function ? thanks a lot.
best regards,
Kin Hong
2023-05-17 04:25 AM
Hi,
based on this function I can explain to you:
INT pin should be high only for some ten/hundreds of microseconds.
Your scope shot is weird:
Best Regards, Ulysses