你好:
我们在 sabresd_6q板子上加入了mfrc522 rfid模块,使用的android版本是4.4.2,linux 内核是3.0.35,mfrc522模块与主机使用spi通讯,
spi通讯已经正常,能够读取到mfrc522寄存器的值,读到的都是复位后的默认值,如:CommandReg 读出来是0x20,VersionReg 读出来是0x92 。但是往寄存器中写数据,写入后,再读出来,仍然是默认值。也就是没有写入。
是否有类似于写保护之类的设置呢?还是有其他原因?
Hello Liu,
See following, please!
(1) Some registers in RC522 are read-only
you please check if registers you operated are read only.
(2) SPI speed
If SPI speed of CPU is too High, maybe you can only read registers, but writing data failed, so you can try to decrease SPI's speed of CPU side.
Hope above advice can help you!
Best Regards,
Weidong