Skip to main content
Explorer
December 16, 2020
Solved

ST25DV16 - CRC16 Calculation for when the Error flag is set

  • December 16, 2020
  • 4 replies
  • 1594 views

Hi,

I am receiving the wrong CRC16 value from the tag when it is answering error flags, for example:

2020-12-16 14:01:18.143 writeMsg >> 02AA0200AA

2020-12-16 14:01:18.148 writeMsg << 0F0F68EE

I forced an error there (writing to the MB when it is off) and the tag correctly answered 0F0F, but the answered CRC (68EE) is not correct, according to the standard it should be 0x7478

What am I doing wrong here? Is the tag really answering wrong CRCs for error codes or is there any other reason why this value is different?

Thanks,

Gustavo

    This topic has been closed for replies.
    Best answer by Gustavo.Laureano

    Thanks Brian

    It seems to be really a problem with the FEIG reader / driver, as I get the correct 010F response when I transceive with a smartphone.

    4 replies

    Technical Moderator
    December 17, 2020

    Hi,

    The 0F0F68EE answer sounds strange. On my side the answer is 010F68EE (in that case the CRC 68EE is correct). is it a kind of trace error/printf error in your log?

    Rgds

    BT

    Explorer
    December 17, 2020

    Hi Brian,

    That's strange

    I tested it both with ST25PC-NFC tool on my computer and an application that I developed myself... on both cases using a FEIG ID CPR30, and on both cases all tags (16K and 64K), returned 0F0F68EE

    But now I decided to test with my cellphone, sent the raw NFC command and the answer was indeed 010F

    Now it seems to be some bug on the FEIG driver or hw... but it give wrong results only on this specific case.. any other suggestions?

    Thanks for your help

    BR

    Gustavo

    Technical Moderator
    December 17, 2020

    Hi Gustavo,

    the tag can only send 00 or 01 as response flag, so I tend to believe the issue is on reader side. If you have a NFC spy, you can check the real value being returned by the tag or you can use a scope with a simple loop (but in that case you would have to decode manually the tag response...). You can also contact FEIG so that they can investigate on their side.

    Rgds

    Bruno

    Gustavo.LaureanoAuthorAnswer
    Explorer
    January 5, 2021

    Thanks Brian

    It seems to be really a problem with the FEIG reader / driver, as I get the correct 010F response when I transceive with a smartphone.