RC522, ATQA and valid bits. Pls explain.

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

RC522, ATQA and valid bits. Pls explain.

跳至解决方案
1,439 次查看
Haddock
Contributor II

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.

0 项奖励
回复
1 解答
1,420 次查看
Ricardo_Zamora
NXP TechSupport
NXP TechSupport

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

Best Regards,
Ricardo

在原帖中查看解决方案

0 项奖励
回复
1 回复
1,421 次查看
Ricardo_Zamora
NXP TechSupport
NXP TechSupport

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

Best Regards,
Ricardo
0 项奖励
回复