MFRC522

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决
371 次查看
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 项奖励
回复
1 解答
328 次查看
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 项奖励
回复
1 回复
329 次查看
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 项奖励
回复
%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%3E%E5%A4%A7%E5%AE%B6%E5%A5%BD%3C%2FP%3E%3CP%3E%E6%88%91%E6%AD%A3%E5%9C%A8%E4%BD%BF%E7%94%A8%20MFRC522%20%E8%AF%BB%E5%8D%A1%E5%99%A8%20IC%20%E5%92%8C%20MIFARE%20Classic%20%E5%8D%A1%E3%80%82%3CBR%20%2F%3E%E5%9C%A8%E6%88%91%E7%9A%84%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%E4%B8%AD%EF%BC%8C%E6%9C%89%E6%97%B6%E5%91%BD%E4%BB%A4%EF%BC%88%E5%A6%82%E9%AA%8C%E8%AF%81%E3%80%81%E8%AF%BB%E5%8F%96%E6%88%96%E9%80%92%E5%87%8F%EF%BC%89%E4%BC%9A%E5%9B%A0%E8%B6%85%E6%97%B6%E6%88%96%20CRC%20%E9%94%99%E8%AF%AF%E8%80%8C%E5%A4%B1%E8%B4%A5%E3%80%82%3C%2FP%3E%3CP%3E%E6%88%91%E7%9A%84%E9%97%AE%E9%A2%98%E6%98%AF%3C%2FP%3E%3CP%3E%E5%91%BD%E4%BB%A4%E5%A4%B1%E8%B4%A5%E5%90%8E%EF%BC%8C%E6%98%AF%E5%90%A6%E5%BF%85%E9%A1%BB%E9%87%8D%E6%96%B0%E4%B8%8E%E5%8D%A1%E5%BB%BA%E7%AB%8B%E9%80%9A%E4%BF%A1%EF%BC%88%E5%8D%B3%E5%86%8D%E6%AC%A1%E5%8F%91%E9%80%81%20REQA%2FWUPA%20%E2%86%92%20ANTICOLLISION%20%E2%86%92%20SELECT%EF%BC%89%EF%BC%8C%E8%BF%98%E6%98%AF%E5%8F%AF%E4%BB%A5%E7%9B%B4%E6%8E%A5%E9%87%8D%E8%AF%95%E5%91%BD%E4%BB%A4%EF%BC%9F%3C%2FP%3E%3CP%3E%E6%88%91%E6%9F%A5%E7%9C%8B%E4%BA%86%20MFRC522%20%E7%9A%84%E6%95%B0%E6%8D%AE%E8%A1%A8%EF%BC%8C%E4%BD%86%E6%B2%A1%E6%9C%89%E5%8F%91%E7%8E%B0%E4%BB%BB%E4%BD%95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6%AD%A4%E8%A1%8C%E4%B8%BA%E7%9A%84%E7%9B%B8%E5%85%B3%E9%83%A8%E5%88%86%E3%80%82%3C%2FP%3E%3CP%3E%E8%B0%A2%E8%B0%A2%E3%80%82%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%3E%E8%BF%99%E6%98%AF%E5%BF%85%E8%A6%81%E7%9A%84%EF%BC%8C%E5%9B%A0%E4%B8%BA%E6%A0%B9%E6%8D%AE%20ISO%2FIEC%2014443-3%20%E5%92%8C%20MIFARE%20Classic%20%E8%A7%84%E8%8C%83%EF%BC%8C%E5%91%BD%E4%BB%A4%E5%A4%B1%E8%B4%A5%EF%BC%88%E5%B0%A4%E5%85%B6%E6%98%AF%E9%AA%8C%E8%AF%81%E5%A4%B1%E8%B4%A5%EF%BC%89%E5%90%8E%EF%BC%8C%E5%8D%A1%E5%8F%AF%E8%83%BD%E4%BC%9A%E8%BF%87%E6%B8%A1%E5%88%B0%20IDLE%20%E6%88%96%20HALT%20%E7%8A%B6%E6%80%81%E3%80%82%E5%9C%A8%E8%BF%99%E7%A7%8D%E7%8A%B6%E6%80%81%E4%B8%8B%EF%BC%8C%E9%99%A4%E9%9D%9E%E9%87%8D%E6%96%B0%E6%BF%80%E6%B4%BB%EF%BC%8C%E5%90%A6%E5%88%99%E8%AF%A5%E5%8D%A1%E5%B0%86%E4%B8%8D%E4%BC%9A%E5%93%8D%E5%BA%94%E8%BF%9B%E4%B8%80%E6%AD%A5%E7%9A%84%E5%91%BD%E4%BB%A4%E3%80%82%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EISO%2FIEC%2014443-3%3C%2FSTRONG%3E%E6%A0%87%E5%87%86%EF%BC%88%E5%A6%82%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%3E%E6%81%A9%E6%99%BA%E6%B5%A6%EF%BC%88AN10834%3C%2FA%3E%EF%BC%89%E4%B8%AD%E5%8F%82%E8%80%83%EF%BC%8C%E6%8F%8F%E8%BF%B0%E4%BA%86PICC%EF%BC%88%E5%8D%A1%EF%BC%89%E5%9C%A8%E5%87%BA%E7%8E%B0%E6%9F%90%E4%BA%9B%E9%94%99%E8%AF%AF%E5%90%8E%E5%A6%82%E4%BD%95%E8%BF%9B%E5%85%A5%E7%A9%BA%E9%97%B2%E6%88%96%E6%9A%82%E5%81%9C%E7%8A%B6%E6%80%81%EF%BC%8C%E9%9C%80%E8%A6%81%E6%96%B0%E7%9A%84%E6%BF%80%E6%B4%BB%E5%BA%8F%E5%88%97%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E