cancel
Showing results for 
Search instead for 
Did you mean: 

ST25R95 Jumps out of IDLE without tag

PDIhawk
Associate III

Using my Arduino UNO and X-NUCLEO-NFC03A1 with the ST25R95 I am having issues trying to stay in IDLE.

For DacDataL and DacDataH, I have tried both the recommended 0x64 and 0x74 for the demo board and the 0x90 and 0xA0 that came from Tag Detection Calibration.

Approximately every 552ms it jumps out of Idle state and the IRQ_O never goes LOW.

I have attached a trace.  I still haven't been able to capture a trace that includes IRQ_O.

It shows boot, going into Idle, jumps out of Idle, polls for reading, reads and goes back to Idle.

Why might my code be jumping out of Idle mode?

1 ACCEPTED SOLUTION

Accepted Solutions

Hi,

I've seen a protocolSelect ISO14443A in your trace before going to Idle. Make sure the field is OFF before going to Idle mode (ie. send a 00 02 01 00 = protocolSelect FieldOff ).

The IRQ_OUT returns high when the response from the device has been read. Therefore, before sending a new command, the response of the previous one has to be read.

Can you share a picture of your HW setup? Is the X-NUCLEO-NFC03A1 antenna covering some electronics part of the Arduino board?

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

7 REPLIES 7
Brian TIDAL
ST Employee

Hi,

As explained in the ST25R95 datasheet §5.9, the SPI poll mechanism cannot be used when the device is in WFE mode and the application has to rely on the IRQ_OUT. 

In the trace, I can see a SPI Poll after then Idle command. Its response has no meaning. Only the IRQ_OUT should be used.

I've also seen that the poll command does not follow figure 7 § 4.1.1 of the datasheet. I would suggest to use only IRQ_OUT in the whole application as this is done inside the RFAL.

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.

Hi Brian,

I'm aware of datasheet §5.9 and I'm not using the SPI poll mechanism in that manner.

The poll that you are seeing runs after it jumps out of idle because it thinks that it sees a tag and tries to do a read.

I commented out the poll and read.  The attached log is from a version that boots, goes into Idle, waits for IRQ_O to go LOW, IRQ_O goes low and goes back to idle.  Unfortunately, it looks like it IRQ_O never goes HIGH again because I'm not reading out the part anymore.

Looking back over my code, this was a branch of my original code from before I could calibrate or read a tag. This branch is specifically to get Idle working.  So the tag reading commands were not complete but I don't think that adding those routines would have an effect on this issue.

Regardless, I will move to using IRQ_O instead of an SPI polling routine for reads.

Thanks!

-Andrew

Hi,

I've seen a protocolSelect ISO14443A in your trace before going to Idle. Make sure the field is OFF before going to Idle mode (ie. send a 00 02 01 00 = protocolSelect FieldOff ).

The IRQ_OUT returns high when the response from the device has been read. Therefore, before sending a new command, the response of the previous one has to be read.

Can you share a picture of your HW setup? Is the X-NUCLEO-NFC03A1 antenna covering some electronics part of the Arduino board?

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.

Hi Brian,

That is correct, I didn't realize that the field has to be OFF before going into Idle mode. I was trying to go into Idle mode when protocol was set to ISO14443A.  I will add that.

Here is my development setup:

20240226_124727.jpg20240226_124712.jpg

There is nothing below the antenna, so I wouldn't expect any effect of the UNO on the antenna.

However, after switching to use IRQ_OUT as my signal that the ST25R95 is ready to read, it errors out.  By error out, I mean that I give 100ms to be ready for a read and it "errors out".  This happens after the first attempt, when trying to do an echo.

Thanks!

-Andrew

 

Brian TIDAL
ST Employee

Hi,

do you mean that after a command, you start a 100ms timer and wait for either IRQ_OUT (ie. response available) or timer expiry?

This would be helpful to have an SPI trace with IRQ_IN and IRQ_OUT so that I can check the startup sequence timings. In particular, make sure to properly wait for t3 after the initial IRQ_IN pulse. See https://community.st.com/t5/st25-nfc-rfid-tags-and-readers/cr95hf-error-0x71-spi-interface/m-p/329870 for an example of initialization sequence. Before sending the echo command, it is possible to poll for readiness by sending a poll control byte (0x03) after the startup sequence (i.e. after t3), If bit2 of the response byte is 1, the CR95HF is ready to receive commands. When sending the poll control byte to poll for readiness after startup, the usual response is 0x06 which means a command such as echo can be sent to the ST25R95.

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.
PDIhawk
Associate III

Ok, after closer looking at the ST32duino library code, I was missing an nIRQ Pulse on boot.  I had the one after reset but not on boot as I should have.

After turning the Field OFF before Idle and adding the nIRQ Pulse before the Reset command, my problems above are fixed.

Now I can't seem to get it to recognize a tag, but I guess that is for another thread.

Brian TIDAL
ST Employee

Well done!

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.