cancel
Showing results for 
Search instead for 
Did you mean: 

RF communication between ST25R3916B and ST25DV64KC

StefanoSperandio_ST
Associate III

Hi everyone!

I’m working with two ST expansion boards:

  1. NFC07A1 – ST25DV64KC
  2. NFC08A1 – ST25R3916B

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:

    1. Direct command (C0) → Set Default
    2. Register 0x02 → 0xC8
    3. Register 0x03 → 0x74
    4. Direct command (C2) → Stop All Activities
    5. Direct command (DB) → Clear FIFO
    6. Direct command (D6) → Adjust Regulators

    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:

  1. The frame I’m sending is the same as the one I successfully tested using the Android app, which triggered the interrupt on the Tag correctly.
  2. The RF field is being generated correctly because the RF field presence interrupt activates when the two devices are brought close together.
  3. The FIFO appears to be written correctly.

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.

This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
1 ACCEPTED SOLUTION

Accepted Solutions

Hi Stefano,

 

ad 1)

The ndef_rw example does also poll in ISO/IEC 15693 (using subcarrier stream mode) and will discover the NFC7. If a proper NDEF content is already on the tag it will read that as well.

 

ad 2) Wake-up mode is a way of saving power. In this mode the ST25R will just emit short field pulses and observe the detuning of the LC tank using RFI pins. A host MCU can be woken by it and then perform the actual field on and polling.

 

ad 3) For ISO/IEC 15693 after discovering the tag with its UID you can right away continue to reading/writing the memory. This is not necessarily the case for tags of different technologies.

Trying to just follow the  'Application Information'  section I can only recommend if you have profound knowledge of NFC, ISO/IEC 15693. Still then I advise to obtain necessary receiver and other register settings from our reference software. If not you may run into operating the ST25R in a non-optimal configuration and potentially having something only borderline functional.

BR, Ulysses

 

View solution in original post

6 REPLIES 6
Ulysses HERNIOSUS
ST Employee

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:

  • First enable oscillator, then enable field
  • Give time after field on for tag to be powered.
  • Set proper operation mode, for NFC7 you would need streaming mode with specific settings
  • Your software will need to do proper bit coding and decoding as NFC-V framing is not supported inside 3916B
  • Set up proper transmit length
  • Set up proper timers: MRT and NRT
  • Set up proper analog receiver settings
  • ......

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

 

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

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

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!

Hi Ulysses!!
I'm trying to understand the ndef_rw example, but I'm encountering some difficulties. Especially, there are a few points where I need clarification:

  1. Which mode should I enable to work with ISO 15693? I noticed that the example is based on ISO 14443A/B, but the tag I need to read (ST25DV64KC) operates on ISO 15693. Is that correct? From the datasheet, I understand that the correct mode might be 'Stream Mode.' Is this the right approach?

  2. To use this chip correctly, I am starting with the detection of an NFC Tag of this type, and I plan to move on to reading/writing later. From the datasheet and the example, it seems that the Wake-Up mode is recommended as a first step. Does this mode also power on the RF field? Should I expect to detect a Tag and then check the interrupt registers to confirm whether the Tag was detected or not?

  3. After detecting the Tag, can I proceed directly to preparing and sending commands, or are there additional procedures or intermediate states I need to implement?

I apologize for asking so many questions, but I am finding it extremely difficult to fully understand the examples I have found online. I am also struggling to figure out how to write my own code and adapt it to my specific requirements.

I am trying to follow as closely as possible the guidance in the 'Application Information' chapter of the datasheet regarding operational modes, along with a detailed analysis of the example code. However, I would greatly appreciate some advice on how to proceed further.

 

Thank you in advance.

BR,

Stefano

Hi Stefano,

 

ad 1)

The ndef_rw example does also poll in ISO/IEC 15693 (using subcarrier stream mode) and will discover the NFC7. If a proper NDEF content is already on the tag it will read that as well.

 

ad 2) Wake-up mode is a way of saving power. In this mode the ST25R will just emit short field pulses and observe the detuning of the LC tank using RFI pins. A host MCU can be woken by it and then perform the actual field on and polling.

 

ad 3) For ISO/IEC 15693 after discovering the tag with its UID you can right away continue to reading/writing the memory. This is not necessarily the case for tags of different technologies.

Trying to just follow the  'Application Information'  section I can only recommend if you have profound knowledge of NFC, ISO/IEC 15693. Still then I advise to obtain necessary receiver and other register settings from our reference software. If not you may run into operating the ST25R in a non-optimal configuration and potentially having something only borderline functional.

BR, Ulysses