Skip to main content
Visitor II
March 6, 2019
Solved

cr95hf won't pole after idel command

  • March 6, 2019
  • 6 replies
  • 4538 views

Hi i am using an cr95hf. After using an idel command and waking up afterwards any command I send after the idle wont work. I don't even get a polling response. Unfortunately I can't find anything in the cr95hf datasheet telling me if i need to reset or anything similar after exiting the idle mode. Also I am using the cr95hf as the plug and it is connected to an atmega 128 and I am communicating via SPI.

    This topic has been closed for replies.
    Best answer by Brian TIDAL

    Hi Michael,

    the antenna on the PLUG-CR95HF-B board has the following characteristics:

    • dimension: 43 x 34 mm.
    • number of turns: 2

    the antenna on the X-NUCLEO-NFC03A1 board has the following characteristics:

    • dimension: 47 x 34mm
    • number of turns: 4

    I will try to grab a PLUG-CR95HF-B and make some read range tests and detection range tests. On your side, can you request your local distributor to send you an X-NUCLEO-NFC03A1 board?

    For your own design, ST provides the following application note and calculation tool that should help to improve the performances

    • AN5248: ST25R95 transceiver antenna tuning circuit with EMI filter
    • STSW-ST25R003: antenna tuning circuit with EMI filter calculation tool

    Also, feel free to send to me (in private) your schematics so that I can manage to have them being reviewed by RF experts team.

    Note: if you change the antenna on the PLUG-CR95HF-B, the matching circuit will need to be updated.

    I would also recommend to base your firmware on top of ST RF Abstraction Layer (RFAL) firmware provided in X-CUBE-NFC3 v2.0.0: this RFAL abstracts the reader being used so that you can easily move to ST25R3911B or ST25R3916 reader in case high performances are needed without having to change your code. The RFAL can be easily tailored to fit your flash/ram constraints.

    Regarding the calibration, make sure to calibrate when no tag are in in the operating volume. Make sure to have no metallic parts (cables, ...) under the antenna. With my X-NUCLEO-NFC03A1, in Idle mode, I am able to detect a Type 4A tag at ~3 cm and then able to read it.

    Rgds

    BT

    6 replies

    Technical Moderator
    March 7, 2019

    ​Hi

    here is a log file with timestamp showing the idle command being used, a tag being detected and the various polling activities being resumed.

    On my side I use the following Idle command:

    070E0A21003801180024606070803F00

    Can you send me the command you are using on your side and a log of the data being sent/received over the SPI?

    I suggest you send a echo command to check whether the CR95HF is back in active mode after the response of the Idle command.

    Also feel free to have a look to x-cube-nfc3 firmware package (version 2.0.0, make sure to refresh your brower to get the latest release). The idle command over SPI is implemented as part the firmware (st25r95SPIIdle).

    AN3433 calibrationalso gives some important information. In particular, before using Idle a has to be performed. This is implemented in the x-cube-nfc3 firmware package.

    Thanks

    Rgds

    BT

    MUngeAuthor
    Visitor II
    March 7, 2019

    hi,

    I send the idle command {07,0E}

    with the following parameters:

    {0x02,0x21,0x00,0x79,0x01,0x18,0x00,0x01,0x60,0x60,0x94,0xFD,0x3F,0x01};

    after the idle i get a 000102 so it is detecting a tag.

    But then sending an echo or anything else wont work.

    Sending an echo and polling it just wont give me the 8 telling me that polling is done.

    If I send numerous comands it will at some point start returning 01020000 over and over again.

    best regards Michael

    MUngeAuthor
    Visitor II
    March 7, 2019

    I attached the log if you want me to format it differently let me know.

    This time the echo command right after idle actually worked but the command after that already gets a unexpected(not possible) response.

    The commands after the echo are from the cr95hf datasheet for nfc forum tag type2 for 14443-A. If I use these commands without the idel before hand i get a correct UID.

    Technical Moderator
    March 7, 2019

    ​Hi Michael,

    See my comment below:

    • 07h Idle Command Code
    • 0Eh Len
    • 02h Wake-up flag: only bit Tag detector is set. I would recommand to set as well Wake up in low IRQ_IN level ==> 0Ah instead of 02h
    • 2100h Enter Control: Tag Detection ==> OK
    • 7901h WakeUp Control: the updated version of the ST25R95 / CR95HF DataSheet recommands to use value 3801h
    • 1800h: Leave Control: tag detection ==> OK
    • 01h: WU period: on my side I've used 24h.
    • 60h Osc start default value: ok
    • 60h: dac start default value: ok
    • 94h DacL See below
    • FDh DacH. The maximum value of the DAC is FCh (6 bits DAC, value coded on b7-b2, b1-b0 are rfu). I believe DacL/DacH are erroneous. The recommended guard band is 2 dac steps (08h) and the DacL/DacH values should be (DacRef - guard, DacRef + guard). DacRef is computed during calibration procedure. The x-cube-nfc3 firmware package 2.0.0 implements the calibration procedure. For my X-NUCLEO-NFC03, DacRef is 78h and DacL=70h, DacH=80h. Feel free to reuse the calibration procedure from x-cube-nfc3 firmware package. Make sure to have no tag in the operating volume when performing the calibration.
    • 3Fh swing count default value ok
    • 01h max sleep

    Can you give more details about your setup:

    • which board do you use:
      • X-NUCLEO-NFC03A connected to an MCU board
      • custom board. If custom board, make sure that the OscStart parameter (HFO stabilization delay) is aligned with the characteristic of your oscillator
    • do you use  ST driver library (x-cube-nfc3) or your own driver? if using x-cube-nfc3, which version?
    • when entering low power mode on ST25R95 / CR95HF, is the MCU also entering low power mode?
    • can you send me the result of the IDN command (0x01) so that I have the HW revision number of the device
    • how do you poll the ST25R95/CR95HF for the answer of a command? In your traces I see strange values in POLLING <REC> lines
    • what is your SPI configuration (speed, CPOL/CPHA)

    I will have a deeper look to your traces.

    Rgds

    BT

    Technical Moderator
    March 12, 2019

    ​Hi Michael,

    I guess this is PLUG-CR95HF-B.

    Make sure not to have metallic parts under the board when doing read range test. Can you try with tags having credit card size antenna (for example a ski pass)?

    Rgds

    BT

    MUngeAuthor
    Visitor II
    March 13, 2019

    Hi

    yes we are using the PLUG-CR95HF-B.

    Do you know if that is using the same antenna as the one you are using? Because i basically ran a loop with all the possible combinations for gain, modulation and timerW values and for none i could read the data on the tag that was located 2cm away from the antenna(this was a larger tag than before in the size of a ski pass).

    We know soldered another antenna on to the plug an did some minor tests which already gave us better results with more distance. We just soldered it to the free resistor space Rq which is right before the antenna. Can you maybe find out if there is a better place or if that was the right place?

    Since we will integrate the chip into our own design, if we can get it to do all the things we need, using the attached antenna of the plug is not really important for us. But to figure out if it does all we want we it would be nice if we could attach another antenna or get it running with the antenna that is already attached.

    We will do some more testing with both antennas attached and see if we can get the expected distance for tag reading.

    Best Michael

    EDIT: So i did the calibration with the new antenna and got a dacref of 48h pluggin that into the idle function i get the same problem as before, where i only get a read for a tag right on top. This leads me to the assumption, that not the antenna is the problem but rather the calibration,which seems to return a dacref value only suited for tag detection really close to the antenna.

    Technical Moderator
    March 14, 2019

    Hi Michael,

    the antenna on the PLUG-CR95HF-B board has the following characteristics:

    • dimension: 43 x 34 mm.
    • number of turns: 2

    the antenna on the X-NUCLEO-NFC03A1 board has the following characteristics:

    • dimension: 47 x 34mm
    • number of turns: 4

    I will try to grab a PLUG-CR95HF-B and make some read range tests and detection range tests. On your side, can you request your local distributor to send you an X-NUCLEO-NFC03A1 board?

    For your own design, ST provides the following application note and calculation tool that should help to improve the performances

    • AN5248: ST25R95 transceiver antenna tuning circuit with EMI filter
    • STSW-ST25R003: antenna tuning circuit with EMI filter calculation tool

    Also, feel free to send to me (in private) your schematics so that I can manage to have them being reviewed by RF experts team.

    Note: if you change the antenna on the PLUG-CR95HF-B, the matching circuit will need to be updated.

    I would also recommend to base your firmware on top of ST RF Abstraction Layer (RFAL) firmware provided in X-CUBE-NFC3 v2.0.0: this RFAL abstracts the reader being used so that you can easily move to ST25R3911B or ST25R3916 reader in case high performances are needed without having to change your code. The RFAL can be easily tailored to fit your flash/ram constraints.

    Regarding the calibration, make sure to calibrate when no tag are in in the operating volume. Make sure to have no metallic parts (cables, ...) under the antenna. With my X-NUCLEO-NFC03A1, in Idle mode, I am able to detect a Type 4A tag at ~3 cm and then able to read it.

    Rgds

    BT

    MUngeAuthor
    Visitor II
    March 18, 2019

    Hey Brian,

    if the X-Nucleo-NFC03A1 is needed it shouldnt be a problem to get it.

    We have switched back to the built in antenna and I looped over possible dac windows and got resulst for reading up to 2.5 cm with 14443A. I am now trying to finetune the dac values so it'll only return tag detected when that is actually true, but still is able to measure at least 2 cm(I think we won't really need much more than that.).

    I did the calibration on a table with a metal frame but it was at elast 15 cm away from that so I dont think that interfered. I just did the calibration again on a different table and got the same results so I don't think that awas the problem.

    I downloaded the STM32CubeExpansion_NFC3_V2.0.0 and will take a look at the abstraction layer. However I think we wont really need to upgrade to a higher performing chip.

    I will conntect our distributer about the Nucleo board.

    Have you had any success with trying measurements on the plug-cr95hf-b?

    best Michael

    MUngeAuthor
    Visitor II
    March 25, 2019

    Hi,

    I have another Question. For our application we want to use the hibernate state as well as the idle(tag detection) state. When using the command 0x07 0E 08 04 00 04 00 18 00 00 00 00 00 00 00 00

    which is supposed to give me the hybernate state we measure the same supply current as in the tag detection. As a reference we measured the current when our board was powered but the chip not woken yet by an irq_in and got a significant lower value as with either of the idle commands. Is there another option to get to such a low power state or is my command maybe wrong?

    Best Michael

    Technical Moderator
    March 26, 2019

    ​Hi Michaël,

    I've not yet have received a PLUG-CR95HF-B. I hope to have it this week.

    Regarding the hibernate state, I've done some tests on my side. I've put an ammeter on the 3V3 input of the nucleo expansion board (measuring the overall consumption on the expansion board). I can see a significant consumption drop when entering Hibernate state (10.6 µA) vs. Tag Detector state (221µA average). Of course, these values are not significant as I measure the overall consumption on the expansion board but this is proving that the hibernate state is working. I've used the same hibernate command as the one you used. Make sure to measure only the reader part (i.e. make sure not to have your MCU in the consumption path).

    On my side, for the overall expansion board:

    • Power-up state: 330 µs
    • Ready state: 280 µA
    • Tag detector state: 221 µA (average)
    • Hibernate state: 10.6 µA

    Rgds

    BT

    Technical Moderator
    April 26, 2019

    HI Michaël,

    I've done some read range tests with  a PLUG-CR95HF-B.

    I confirm that the read range results are better when using an X-NUCLEO-NFC03A1than when using  a PLUG-CR95HF-B

    On PLUG-CR95HF-B, I reach 6.9 cm max read range for ISO15693 tag whereas I can reach 9.2 cm with X-NUCLEO-NFC03A1. With ISO14443A, I can reach about 2.8 cm on PLUG-CR95HF-B.

    Rgds

    BT