I am using from beginning an arduino example converted to C. The MCU has a RC522 connected to it and using SPI as communication method. No collision handling or authentication is needed. The device only checks that the PICC can send its UID (it's a production test)
The call chain is: PICC_IsNewCardPresent -> PICC_RequestA -> PICC_REQA_or_WUPA(PICC_REQIDL 0x26) -> PCD_TransceiveData->PCD_CommunicateWithPICC
When I present a PICC near the RC522 i get a response. The FIFO reg reports that 2 bytes is in buffer (ATQA). I fetch the two bytes and the data is 0x0002. However, just after that I read register (CONTROLREG & 0x07) and that returns and set valid bits to 7. This function returns OK back to PICC_REQA_or_WUPA but that functions reports error because valid bits != 0.
Can anyone explain this valid bits issue? Do I need it?
FYI: I have three different PICC. The reponse is 0x002, 0x0004 and 0x0044 respective. I was thinking of using this ATQA to get the UID somehow - if that is possible. As I said, it will not be a collision with other PICC:s.
Solved! Go to Solution.
Hello,
Are you using any Arduino library?
I apologize but MFRC522 is not recommended for new designs. For new designs, please use recommended product CLRC663 plus, so the support is limited.
Regards,
Ricardo
Hello,
Are you using any Arduino library?
I apologize but MFRC522 is not recommended for new designs. For new designs, please use recommended product CLRC663 plus, so the support is limited.
Regards,
Ricardo