This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TRF7964A: RFID tag error correction

Part Number: TRF7964A

Sir or Madam,

I am using the TRF7964A in a proprietary design which incorporates a 1 uH barrel inductor as the antenna communicating with a custom tag with an NTAG216 RFID IC.  The tag antenna is 13 x 13 mm and has a fixed distance of 3 mm from the top of the inductor.  The original prototypes worked reasonably well with the tag sitting on the top of the inductor rather than in its normal position in a special cartridge.  It was then necessary to replace the inductors on three boards to raise their mounting position to meet the 3 mm height below the tags.  After replacing the inductors two of the three prototypes these units had terrible communication and the third was still usable but with many retries and frequent failures.

The circuit is identical to your recommended circuit and uses 1% resistors and 2% capacitors but unfortunately the inductor tolerance is 10%.  The antenna tuning component values were selected using SimSmith and verified with a VNWA on one sample inductor yielding an antenna impedance of 52 Ohms.  From your experience how much will the receive sensitivity vary with 10% tolerance inductors?  The internal RSSI level is always read as 7.

Now to my main question, retrying CRC, parity, framing and noise/collision errors.  When any of these errors occur during selection I disable the IC (EN low) then re-enable the IC and restart the selection process.  This appears to work quite well.  However when I am reading tag data I retry these errors by re-initiating the read sequence.  This mostly works but on occasion after transmitting the read sequence to the IC, the IC does not start transmitting to the tag and the firmware signals a timeout error.  I have verified this on my DSO.  It appears that once a timeout occurs further retries also fail with timeout errors.  When a timeout occurs the IRQ service subroutine is disabled so it will not interfere with the retry attempt.  The IRU service subroutine is re-enabled immediately after the read sequence has been transmitted to the IC.

Is this retry scheme correct or should the firmware send some other command sequence to properly terminate the prior read operation before starting a new operation?

Best regards,

Al Otis Jr

  • Hello Alton,

    10% tolerance on inductors is likely to have an impact of read sensitivity but I can't really comment on how much because it's highly system dependent. What you'll want to do is tune for close to the median values and then ensure you aren't reading tags at the edge of that read range. Not sure if you can get a sample batch large enough to just test out components on either side of the spectrum.

    As far as retries, our recommendation and what is done in our software is to do a soft reset of the device by sending both a Soft Init and an Idle direct command followed by a 1ms delay, and then reconfigure the device registers and restart communication with the tag. This is used to handle all errors you mentioned above. In some cases, we retry 1-5 times before doing this step, which is perfect fine to do, but there should be a max count for retries before you try and soft reset the device. The sequence of commands is done to clear all internal state machines etc. and puts the device in a fresh operating state. With that, communication errors are usually resolved unless the tag is still placed in any area in the RF field that causes such issues because of poor RF communication.
  • Ralph,

    Thank you for your prompt response.  Regarding the inductor, tuning each unit is not an option however using a precision wound inductor is an option.  My client is not yet in production so I will ask them to investigate alternate inductor sources.  For the prototypes we are using an OTS unit from Bourns.  I am also interested in increasing the diameter of the inductor to completely cover the tag antenna area.

    Regarding retries, currently I am not doing a soft reset of the TRF7964A for pesky recurring errors.  I will try this and get back to you.  The 7964A is serviced by two ISRs.  The first is a 1 ms timer interrupt that moves the process along and the second is the IRQ interrupt.  The ISR level read function reads only one page (4 bytes) at a time.  If multiple pages are required the read is repeated for each page.  Read time at the application level is not critical.  The application issues one read of the entire tag memory (222 pages, 888 bytes) then moves on to other things.  If no errors occur this takes about 2 seconds.  If multiple errors this may expand to 10-20 seconds which is still OK.

    I am assuming a soft reset only affects the 7964A and will not deselect the tag.  Please confirm.

    More later.

    Al

  • Hello Alton,

    I didn't mean to tune each inductor, but rather tune for the median case and then understand how the performance shifts across inductor values over that tolerance span. If you can read tags across the variance of inductance values, then you'll be fine.

    The soft reset will deselect the tag because it will kill the RF field. There is no other way to properly reset the device. This is standard procedure anyways, and the NFC forum mandates that the RF field must be turned off and communication restarted from step one after the max amount of retries is exceed (typically set to 2) when trying to be NFC forum compliant. Not that you need to be, but just stating that resetting the RF field due to errors is expected behavior by how NFC works and not a device flaw.

  • Ralph,

    OK on the inductor.

    The need to reselect the tag as part of the error recovery procedure is a moderate change for my RFID code but I will make the change and test the result. Currently the application selects the tag as step 1 then performs the read as step 2 and finally deselects the tag as step 3. The select operation includes ISR level retries and starts by setting EN low for 1 ms then waiting for oscillator stabilization before proceeding. The read operation assumes the tag is selected and makes no attempt to re-select the tag. In the new scheme tag selection will be part of the read operation and included in retries. This will also apply to write operation which are not part of this post. I will keep the select only operation for making initial inquiries about the tag parameters. The select operation will use the soft reset rather than setting EN low for 1 ms.

    When I use the soft reset to start selection may I assume the oscillator, which was enabled and stabilized earlier, is still stabilized? Or in other words, the soft reset does not stop and restart the oscillator. Please confirm.

    Best regards,

    Al
  • Hello Alton,

    The oscillator will remain stabilized, the soft reset will not stop and restart the oscillator.
  • Ralph,


    Thank you for your help.  I rewrote the NTAG21x tag read and write  functions to always start with a full reset and select.  This is a hardware reset (toggle EN low for 1 ms) then a soft reset then wait for the oscillator to stabilize before performing the select.  Any detected error will restart from the beginning.  The total attempt count is set to 10.  The read and write functions read only one page at a time with a page count of 1 to the tag limit.  Any error will be retried once.  If another error is detected the process restarts at the full reset and select.  Successfully read pages are not reread, only those remaining.

    This did improve operations but I was still getting IRQ interrupt timeouts which were caused by IRQ randomly going high between successful commands thus causing the ISR to miss the leading edge of the transmit done interrupt.  To correct this I added a read of registers 0x0C and 0x0D as part of the ISR startup code prior to each command transmission.  I test the code by doing 1000 consecutive full reads of a tag.  Generally the uncorrectable error count with all firmware changes added is about 3-4%.  Not too good.

    Next I tried to improve the magnetic coupling between the top of the barrel inductor antenna and the tag.  This was pay dirt.  Full test runs over four different PCBs yielded 0% uncorrectable errors.  I am now experitmenting with further coupling improvements.

    On a related topic I could not find a description in the datasheet of how the TRF7964A reports host transmission errors reported by the tag with NAKs.  Where is this discussed?  The information in the description of register 0x0C seems to refer only to errors detected by the TRF7964A during tag reply transmissions.  Did I miss something?

    Best regards,

    Al

  • Hello Alton,

    NAK replies are handled at a software level. The TRF7964A recognizes RF errors like CRC, Parity, collided responses from multiple tags etc. but it does not check for protocol specific errors such as NAK, or errors such as those defined in ISO7816-4.
  • Ralph,

    My mind must have been elsewhere when I asked about NAK sensing.  The NAK is stored in the FIFO in the high order nybble of the first byte and the reported FIFO byte count is 1.  My code already handles these conditions.

    I believe this completes my current round of questions.  Thank you for your help.

    Best regards,

    Al