cancel
Showing results for 
Search instead for 
Did you mean: 

Issue in SPI protocol on ST25R3916

MKlim.1
Associate II

Hi! I'm can't understand SPI protocol on STM25R95ST25R3916. I tried to send commands via SPI like in datasheet but did not have any response. Do i need to toggle IRQ_IN pin every time i send a package over SPI? Will chip work without CS on every message ?

1 ACCEPTED SOLUTION

Accepted Solutions
Brian TIDAL
ST Employee

Hi,

can you share some details about your HW setup:

  • do you use the X-NUCLEO-NFC03A1 shield or a custom board?
  • for the MCU part, do you use a NUCLEO-L476RG or another STM32 MC or a not ST MCU?
  • how is the ST25R95 connected to the MCU: wire jumper or PCB?

Can you confirm SSI_0=3V3 and SSI_1=0V? Can you probe SSI_0, SSI_1 and nIRQ_IN at power up/startup sequence so that we can check the timings? can you probe XIN and XOUT to make sure the cristal is oscillating after t3 (HFO setup time)? Can you check that the SPI is properly configured (Motorola format, 8 bits data, MSB first, clock polarity low, clock phase 1 edge. For the baud rate, the driver in X-CUBE-NFC3 uses 1.5 Mbits/s)

Regarding your questions, after the completion of the startup sequence, there is no need to toggle nIRQ_IN (except when Idle mode is used). The ST25R95 cannot work without proper nSPI_SS management: ‘Sending’, ‘Polling’ and ‘Reading’ commands must be separated by a high level of the SPI_SS line as per the ST25R95 datasheet § 4.1.1.

In order to check that the SPI is functional, you can send a 0x03: Poll command; the reply should have flag bit #2 equals to 1 (Data can be sent to the ST25R95 when set).

Note: X-CUBE-NFC3 provides a a hardware independent scalable NFC communication stack on top of a driver for the ST25R95/CR95HF. I would recommend to use this FW that provides the communication protocol on top of SPI.

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

5 REPLIES 5
Brian TIDAL
ST Employee

Hi,

can you share some details about your HW setup:

  • do you use the X-NUCLEO-NFC03A1 shield or a custom board?
  • for the MCU part, do you use a NUCLEO-L476RG or another STM32 MC or a not ST MCU?
  • how is the ST25R95 connected to the MCU: wire jumper or PCB?

Can you confirm SSI_0=3V3 and SSI_1=0V? Can you probe SSI_0, SSI_1 and nIRQ_IN at power up/startup sequence so that we can check the timings? can you probe XIN and XOUT to make sure the cristal is oscillating after t3 (HFO setup time)? Can you check that the SPI is properly configured (Motorola format, 8 bits data, MSB first, clock polarity low, clock phase 1 edge. For the baud rate, the driver in X-CUBE-NFC3 uses 1.5 Mbits/s)

Regarding your questions, after the completion of the startup sequence, there is no need to toggle nIRQ_IN (except when Idle mode is used). The ST25R95 cannot work without proper nSPI_SS management: ‘Sending’, ‘Polling’ and ‘Reading’ commands must be separated by a high level of the SPI_SS line as per the ST25R95 datasheet § 4.1.1.

In order to check that the SPI is functional, you can send a 0x03: Poll command; the reply should have flag bit #2 equals to 1 (Data can be sent to the ST25R95 when set).

Note: X-CUBE-NFC3 provides a a hardware independent scalable NFC communication stack on top of a driver for the ST25R95/CR95HF. I would recommend to use this FW that provides the communication protocol on top of SPI.

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
MKlim.1
Associate II

Hi! I was wrong, i have st25r3916 on X-NUCLEO-NFC06A1. And i used wrong manual. But also i have questions about spi protocol on st25r3916. Could you please describe me what to do (what bytes should i send over spi ) to start listing RFID type ISO 14443? Because I'm a little confused after reading st25r3916 manual.

Best regards,

Matvei Klimov

Hi Matvei,

the ST25R3916 is in this respect more low level than the ST25R95. There are lots of things to be configured in the chip to be able to read tags at good performance. Therefore we recommend to use the RFAL for developing your software unless you are an NFC expert and prefer to do everything on your own.

I propose to get a supported Nucleo board, e.g. NUCLEO-L476 and try the X-CUBE-NFC6 or STSW-ST25R-LIB.

Best Regards, Ulysses

MKlim.1
Associate II

Hi! Thank you for your reply! Ok, i get that. So the next question is for our task we need to increase speed of reading RFID Tags, because in ST example as i understand it reads once in a second and also you need to remove RFID tag form field before you could read again. So for us it would be great if we could speedup reading at least 10-15 reads in second. Is it possible on that chip? And how can i do it?

Best regards,

Matvei Klimov

Hi Matvei,

yes sure, it is just a configuration on the X-CUBE-NFC6 software. I think it should be named totalDuration. As to what you do with the tag once discovered is up to the demo app. Just change it to fit your needs.

Best Regards, Ulysses