MFRC522

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
361 Views
RajPadmani
Contributor II

Hello everyone,

I’m using the MFRC522 reader IC with MIFARE Classic cards.
In my application, sometimes a command (for example, authentication, read, or decrement) fails due to timeout or CRC error.

My question is:

After any command failure, is it mandatory to reestablish communication with the card  (i.e., send REQA/WUPA → ANTICOLLISION → SELECT again), or can I retry the command directly?

I’ve checked the MFRC522 datasheet, but I didn’t find any explicit statement that says the communication must be reinitialized after an error.
However, I know that in ISO/IEC 14443 and MIFARE Classic documentation, the card may return to an IDLE or HALT state after errors or failed authentications, which might require reactivation.

Could you please confirm the correct recovery procedure according to NXP’s official recommendation for the MFRC522?
And if possible, point me to the relevant section in the datasheet, application note, or ISO reference that specifies this behavior.

Thanks.

0 Kudos
Reply
1 Solution
318 Views
jimmychan
NXP TechSupport
NXP TechSupport

This is necessary because after a failed command, especially authentication, the card may transition to the IDLE or HALT state, as per ISO/IEC 14443-3 and MIFARE Classic specifications. In such states, the card will not respond to further commands unless reactivated.

The ISO/IEC 14443-3 standard (e.g. referenced in NXP AN10834) describes how a PICC (card) may enter IDLE or HALT states after certain errors, requiring a new activation sequence.

View solution in original post

0 Kudos
Reply
1 Reply
319 Views
jimmychan
NXP TechSupport
NXP TechSupport

This is necessary because after a failed command, especially authentication, the card may transition to the IDLE or HALT state, as per ISO/IEC 14443-3 and MIFARE Classic specifications. In such states, the card will not respond to further commands unless reactivated.

The ISO/IEC 14443-3 standard (e.g. referenced in NXP AN10834) describes how a PICC (card) may enter IDLE or HALT states after certain errors, requiring a new activation sequence.

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2193235%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EMFRC522%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2193235%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20everyone%2C%3C%2FP%3E%3CP%3EI%E2%80%99m%20using%20the%20MFRC522%20reader%20IC%20with%20MIFARE%20Classic%20cards.%3CBR%20%2F%3EIn%20my%20application%2C%20sometimes%20a%20command%20(for%20example%2C%20authentication%2C%20read%2C%20or%20decrement)%20fails%20due%20to%20timeout%20or%20CRC%20error.%3C%2FP%3E%3CP%3EMy%20question%20is%3A%3C%2FP%3E%3CP%3EAfter%20any%20command%20failure%2C%20is%20it%20mandatory%20to%20reestablish%20communication%20with%20the%20card%26nbsp%3B%20(i.e.%2C%20send%20REQA%2FWUPA%20%E2%86%92%20ANTICOLLISION%20%E2%86%92%20SELECT%20again)%2C%20or%20can%20I%20retry%20the%20command%20directly%3F%3C%2FP%3E%3CP%3EI%E2%80%99ve%20checked%20the%20MFRC522%20datasheet%2C%20but%20I%20didn%E2%80%99t%20find%20any%20explicit%20statement%20that%20says%20the%20communication%20must%20be%20reinitialized%20after%20an%20error.%3CBR%20%2F%3EHowever%2C%20I%20know%20that%20in%20ISO%2FIEC%2014443%20and%20MIFARE%20Classic%20documentation%2C%20the%20card%20may%20return%20to%20an%20IDLE%20or%20HALT%20state%20after%20errors%20or%20failed%20authentications%2C%20which%20might%20require%20reactivation.%3C%2FP%3E%3CP%3ECould%20you%20please%20confirm%20the%20correct%20recovery%20procedure%20according%20to%20NXP%E2%80%99s%20official%20recommendation%20for%20the%20MFRC522%3F%3CBR%20%2F%3EAnd%20if%20possible%2C%20point%20me%20to%20the%20relevant%20section%20in%20the%20datasheet%2C%20application%20note%2C%20or%20ISO%20reference%20that%20specifies%20this%20behavior.%3C%2FP%3E%3CP%3EThanks.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2194822%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MFRC522%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2194822%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThis%20is%20necessary%20because%20after%20a%20failed%20command%2C%20especially%20authentication%2C%20the%20card%20may%20transition%20to%20the%20IDLE%20or%20HALT%20state%2C%20as%20per%20ISO%2FIEC%2014443-3%20and%20MIFARE%20Classic%20specifications.%20In%20such%20states%2C%20the%20card%20will%20not%20respond%20to%20further%20commands%20unless%20reactivated.%3C%2FP%3E%0A%3CP%3EThe%20%3CSTRONG%3EISO%2FIEC%2014443-3%3C%2FSTRONG%3E%20standard%20(e.g.%20referenced%20in%20%3CA%20class%3D%22fui-Link%20___w5et180%20f2hkw1w%20f3rmtva%20f1ewtqcl%20fyind8e%20f1k6fduh%20f1w7gpdv%20f1mo0ibp%20fjoy568%20ff5ikls%20f1s184ao%20f1mk8lai%20fnbmjn9%20f1o700av%20f13mvf36%20f1cmlufx%20f9n3di6%20f1ids18y%20f1tx3yz7%20f1deo86v%20f1eh06m1%20f1iescvh%20fhgqx19%20f1olyrje%20f1p93eir%20f1nev41a%22%20tabindex%3D%220%22%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Fapplication-note%2FAN10834.pdf%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20nofollow%22%20data-tabster%3D%22%7B%22%20restorer%3D%22%22%3ENXP%20AN10834%3C%2FA%3E)%20describes%20how%20a%20PICC%20(card)%20may%20enter%20IDLE%20or%20HALT%20states%20after%20certain%20errors%2C%20requiring%20a%20new%20activation%20sequence.%3C%2FP%3E%3C%2FLINGO-BODY%3E