2021-03-01 08:21 AM
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 ?
Solved! Go to Solution.
2021-03-01 09:27 AM
Hi,
can you share some details about your HW setup:
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
2021-03-01 09:27 AM
Hi,
can you share some details about your HW setup:
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
2021-03-05 02:35 AM
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
2021-03-05 02:44 AM
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
2021-03-05 02:56 AM
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
2021-03-05 03:18 AM
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