2024-11-20 07:45 AM
Hi everyone!
I’m working with two ST expansion boards:
Before diving into the communication between these two boards, I tested them individually to explore all their functionalities, and everything worked well. Now, I want to establish RF communication between the Reader (ST25R3916B) and the Tag (ST25DV64KC).
Here’s my setup:
On the Tag side, I’ve enabled the RF activity interrupt by configuring the GPO1 register to 0x05.
On the Reader side, I’ve developed code to configure the necessary registers and send some direct commands. Here’s a summary of the process:
After this setup, I wrote the desired frame into the FIFO and then sent the C4 (Transmit with CRC) direct command.
When I bring the Reader close to the Tag and send the message, the interrupt on the Tag does not trigger. Hence, there seems to be no communication.
Here’s what I’ve verified so far:
Now, here are my questions:
- Am I proceeding in the right direction?
- What could I be doing wrong?
Thank you in advance for your help.
2024-11-21 12:25 AM
Hi StefanoSperandio,
your approach is quite far from what can possibly work. Please start by using our RFAL and one of our demo applications - e.g. the ftm demo from ST25 NFC lib.
To give you a glimpse what is actually missing in your approach:
If you really want to do your own small driver, please use one of our existing demos and observe what it is doing, trying to replicate what you need.
BR, Ulysses
2024-11-22 03:37 AM
Hi Ulysses,
Thank you for the information you’ve shared so far. However, I need to develop custom code to send APDU commands over RF. My objective is to send commands similar to the "Send Custom Command" feature in the ST25 Android App. Specifically, I want to communicate with an ST25KCXX Tag to perform operations like reading or writing single or multiple blocks by sending ISO-compliant frames directly via RF.
I’ve reviewed the available examples for the ST25R3916B, but most of them seem to focus on basic NFC tag polling. Regarding the FTM demo, I don’t think it fits my requirements, as it relies on mailbox functionality. Instead, I need to implement commands like Write Single Block, Read Single Block, Write Multiple Block, or Read Multiple Block, which don’t involve the mailbox at all.
From the datasheet, it appears the ST25R3916B supports NFC-A/B/F/V. I assumed this meant it could handle frame coding and encoding for protocols like ISO15693 (NFC-V) by properly configuring the reader. However, I’ve been told the chip does not natively support NFC-V frame coding and encoding. Could you clarify why this is the case?
I would appreciate any guidance on finding a detailed example or guide that matches my needs. Basically I prefer to develop my own code because i've actually created custom library that allow me to use these two chip with my code structure. Anyway I’m open to using RFAL-based functions if I can find a clear, well-documented example. Ideally, such an example would help me replicate the functionality with custom code later on.
Thank you in advance for any suggestions or resources you can share!
Best regards,
Stefano
2024-11-22 05:55 AM
Hi Stefano,
ST25R3916B is not an NFC controller abstracting the majority of the details of NFC protocols but more of an analog frontend. The host MCU can access registers / execute commands to perform the analog for implementing the mentioned protocols. Many details of configuring for these protocols are the responsibility of the host MCU software.
If you want to look at examples for accessing the EEPROM of ST25DV..KC you best look at our ndef_rw demo inside ST25 NFC lib for ST25R3916B. Before performing read/write you typically also want to first identify tags in the field and not just broadcast read/write commands...
APDU is a term from smartcard (ISO/IEC 7816). These APDU would be typically be sent over a wired link or using T=CL/ISODEP layer on ISO14443-4/NFC-A/B protocol. ISO15693 is at least unexpected in this area.
BR, Ulysses
2024-11-25 12:19 AM
Hi Ulysses!
Thank you for your response.
I know that the management of messages and NFC protocol details is the responsibility of the micro, but this isn't the issue that i'm facing. I've successfully used the ST25DV64KC chip as tag, interacting with it via ST25 android app and also through an NFC Reader App. Specifically, i've been able to send command to the chip, as explained in Chapter 7.6 (RF Commands) of the datasheet.
For example, I sent the command 22 20 0B D2 15 76 66 51 02 E0 11 to perform the "Read Single Block" command on block 0x11.
On the ST25R3916B side, I've already developed the code to manage registers, direct commands, loading data into the FIFO, generating the RF field, etc. What I'm missing is how to send the same RF message (already produced and loaded into the FIFO via micro). I initially thought it was enough to follow the instructions in Chapter 4.2.13 (Reader Operation) of the chip's datasheet, but based on your explanation, it seems that might not be correct or not enough. Did I understand this correctly??
I'm sharing this to clarify that I'm not looking for guidance on how to read or write registers on the ST25DV. Instead, I need to understand how to send RF messages, like the one mentioned above (which I mistakenly referred to as an APDU), using the ST25R3916B to an NFC Tag (i.e. ST25DV64KC or another Tag).
In any case, I've just downloaded the ST25 NFC library and will analyze the ndef_rw demo as you suggested.
If you have any additional information or guidance related to what I’ve described here, I would greatly appreciate it.
Thank you, and have a great day!