cancel
Showing results for 
Search instead for 
Did you mean: 

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

superK
Associate II

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?

1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

5 REPLIES 5
Ulysses HERNIOSUS
ST Employee

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

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.

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

Active p2p is applied to equipment that communicates with the MCU.

I checked and the MCU uses SPI1/2.

Do you know how to communicate with st25r3916 sequentially using rfalapi?

I'd appreciate it if you could let me know.

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