cancel
Showing results for 
Search instead for 
Did you mean: 

Wake up by Tag Detection in ST95HF not working after calibration

Chelsea
Associate II

Hi,

I was able to read ISO/IEC 14443-3 Type A tag using tag_hunting function from sample code. Recently I found tag detection may help to bypass polling stage and interrupt the Host MCU if there is tag nearby.

// Calibration command
[07 0E 03 A2 00 F8 01 18 00 00 60 60 00 xx 3F 01]

I followed the sample code to run the tag detection calibration process and got result when swt_cnt: 0x20, 0x3F, 0x50 .

DacDataH: 0x60, 0x74, 0x78

I also do the calibration with tag nearby, the result is almost same as open-air calibration:

DacDataH with tag: 0x60, 0x70, 0x78

// wake-up by tag detation or IRQ_IN command
[07 0E 0A 21 00 79 01 18 00 20 60 60 64 74 3F 00]

However, when I sent IDLE command to use tag detection & IRQ_IN pin and emit burst indefinitely, it did not wake up when tag was close.

Antenna is fine tuned to read type A tag. Before send IDLE command, ISO14443A_Init() is called to set up protocol. If wake-up by timeout, there was interrupt in IRQ_OUT and able to read Type A tag by tag hunting function.

What else should I check to enable wake-up by tag detection?

Which parameters should I fine tune to make tag detection work?

1 ACCEPTED SOLUTION

Accepted Solutions
Henry Crane
ST Employee

Hello Chelsea,

tag detection is based on the measurement of the voltage drop on RX pins, due to the coupling with tag in vicinity.

Reader antenna tuning in free air has an impact on it. Did you check the input impedance of the antenna matching circuit as documented in AN4327, section 4 step 3 a?

best regards,

Henry Crane

NFC/RFID products support team

View solution in original post

5 REPLIES 5
Brian TIDAL
ST Employee

Hi,

can you provide more information regarding your environment:

  • HW setup
    • X-NUCLEO-NFC03A1 or MB1054B or EVAL-ST95HF or custom board?
  • SW Setup
  • do you use the Card Emulation mode of the ST95HF?
  • What do you mean by "DacDataH: 0x60, 0x74, 0x78"? The calibration returns only one value. If using PCD_TagDetectCalibration, see example in menu_reader.c

For any new project, I would recommend to use X-CUBE-NFC3 firmware that provides the ST25R RF Abstraction Layer API. It supports calibration and tag detection.

Rgds

BT

P.-S.: In ST library, the calibration command is 07 0E 03 A1 00 [...] not 07 0E 03 A2 00 [...]. See AN3433.

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,

  • HW setup
    • it is custom board and it was able to read ISO14443A Type A tag in tag hunting function
  • SW setup
    • I use custom SPI driver and Host MCU could communicate with ST95HF
    • I followed the calibration process and could get DacDataH correctly base on description
  • Tag detection is in IDLE command, and I want it to wake up and sent interrupt to inform Host MCU when tag is prescent.
    • if ST95HF wake-up to READY mode, I use reader mode to read ISO14443A tag, which already works fine in our design
    • ProtocolSelect: 02 04 02 00 00 1A

  • I run three tests with different swt_cnt value and with or without tag to see if there is difference:
    •  if set swt_cnt: ...| 0x20 | 0x3F | 0x50 |
    • DacDataH: .........| 0x60 | 0x74 | 0x78 | (free-air)
    • DacDataH: .........| 0x60 | 0x70 | 0x78 | (with tag on antenna, there is no difference compared to free-air testing)
    • I check the calibration step by step, and its returns follow the calibration process.

In datasheet, ARC_B and ACC_A register are configurable for Reader Mode and Card Emulation Mode. According to ST95HF block diagram, Tag Detector is a seperate part beside Reader and Card Emulator. Is there any guideline to set ARC_B and ACC_A register for Tag Detector?

0693W000001syjNQAQ.png

Ps. ​As in datasheet page 37, the Enter Control for tag detector calibration is 0xA200. Anyway, I also tried 0xA100 and both seems work correctly.

0693W000001syjSQAQ.png

Brian TIDAL
ST Employee

Hi,

there is a typo in the Datasheet, the correct value is 0xA100. The description of the various bits is available in the ST25R95 datasheet (table 27), bit 1 of CtrlH is RFU and therefore 0xA2 does not make sense. The typo is also in the CR95HF datasheet and in the ST25R95 datasheet.

My question regarding Card Emulation was more related to why you use the ST95HF instead of CR95HF or ST25R95.

My question about the SW setup was to understand whether you use our new RFAL library (included in X-CUBE-NFC3) or our previous library (included in STSW-ST95HF001). My understanding is that you have your own ST95HF driver on top of SPI communication.

Regarding the calibration procedure, the datasheet specifies that "The reference value (DacDataRef) is established during a tag detection calibration process using the CR95HF application setting with no tag in its environment."

The recommended value for Swing count is 0x3F.

If you follow the tag detection calibration process described in the annex B of the Datasheet, the returned value is the center DacDataRef value. The Idle command to be used for the tag detection should have DacDataL = DacDataRef -8 and DacDataH = DacDataRef +8 

If your DacDataRef = 0x74 in open air with SwingsCnt=0x3F, then the idle command should be: [07 0E 0A 21 00 79 01 18 00 20 60 60 6C 7C 3F 00

if you use the PCD_TagDetectCalibration from the ST95HF001 library, then the return value is DacDataH. I would recommend to check whether the return value is the DACDataH or the DacDataRef

TagDetector does not use any modulation, therefore there is not need to send a protocol select command before entering the IDLE mode. Same for ARC_B and ACC_A: not needed for tag detector.

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,

My calibration process follows the sample code and datasheet . It always returns 0x64 as DacDataRef:

// calibration command sent
>>> 07 0E 03 A1 00 F8 01 18 00 00 60 60 00 xx 3F 01

The result for each step is:

Step| xx | <Data>

----------------

..S0 | 00 | 02

..S1 | FC | 01

..S2 | 7C | 01

..S3 | 3C | 02

..S4 | 5C | 02

..S5 | 6C | 01

..S6 | 64 | 02

..S7 | 68 | 01

Therefore, the DacDataRef is 0x64.

  • When I use 0x08 as guard band, it cannot detect tag at all.
    • >>>07 0E 0A 21 00 79 01 18 00 01 60 60 5C 6C 3F 1E
  • When I use 0x04 as guard band, it will wake up randamly. Sometimes it seems to detect tag, but I am not sure whether that detection is false or not.
    • >>> 07 0E 0A 21 00 79 01 18 00 01 60 60 60 68 3F 1E

Base on above test, I guess that the antenna current change is too small to be detected by internal DAC, because I am using different antenna and PCB circuit.

The recommended value for oscillator setup tme (0x60), DAC setup time(0x60) and Swing count (0x3F) is based on eval-st95hf hardware design. According to your explanation and datasheet, the only "input" for Tag Detector is antenna load characteristics.

  • Should I modify above parameters by trial and error?
  • If yes, is there any guideline to help?
  • Is it possible to get internal DAC value to see the antenna current change?

Regards,

Chelsea

Henry Crane
ST Employee

Hello Chelsea,

tag detection is based on the measurement of the voltage drop on RX pins, due to the coupling with tag in vicinity.

Reader antenna tuning in free air has an impact on it. Did you check the input impedance of the antenna matching circuit as documented in AN4327, section 4 step 3 a?

best regards,

Henry Crane

NFC/RFID products support team