Skip to main content
Visitor II
January 14, 2022
Solved

How to control two st25r3916 chips with rfal api using SPI communication method?

  • January 14, 2022
  • 1 reply
  • 1618 views

In the spi communication method, one chip succeeded in DEP communication through interlocking. But I do not know how to control two.

Please, Where should I edit platform.h/rfal_nfc.c / st25r3916_comm.c?

    This topic has been closed for replies.
    Best answer by Ulysses HERNIOSUS

    Hi,

    just refer to my first comment where I sketched an approach to drive two ST25R3916 using RFAL sequentially.

    We don't have an example for such an approach but I also don't expect problems with such an approach.

    BR, Ulysses

    1 reply

    Technical Moderator
    January 14, 2022

    Hi KHyun.1,

    what you could do with little effort is executing the two 3916 chips sequentially:

    • Build your own spi.c which switches SPI block instances / CS pin depending on some external variable e.g selectedChip
    • Perform sequences like:
    1. selectedChip=0; rfalnitialize(); [or rfalNfcInitialize() in case you are using that layer]
    2. Perform some RFAL functions
    3. rfalDeInitialize();
    4. selectedChip=1; rfalnitialize();[or rfalNfcInitialize() in case you are using that layer]
    5. Perform some RFAL functions
    6. rfalDeInitialize();

    We have not seen usecases of having two NFC reader chips in the same design as antennas would interfere when operated independently. Therefore the rfal functions are not re-entrant.

    Could you share some details on your use-case for operating two st25r3916 chips?

    Best Regards, Ulysses

    superKAuthor
    Visitor II
    January 18, 2022

    Each nfc chip needs to communicate with other

    NFC chips periodically. The st25r3916 each has an antenna.

    0693W00000JMJAKQA5.pngDo you have any examples? If there is, please let me know, I would appreciate it.

    Technical Moderator
    January 18, 2022

    Hi KHyun.1,

    using the single ended feature of the ST25R39xx readers you could connect two single-ended antennas (AN5592) and alternate between them (bits 'single' and 'rfo2').

    However I am seeing that your are planning to us use Active P2P. The field detector (needed for AP2P) is however only looking at RFI1.

    It would be possible if you would be using the reader mode instead.

    I see Active P2P disappearing from mobiles (Google and Samsung removed it, Apple never had it). What is your reason to use Active P2P?

    BR, Ulysses