我尝试向调制器控制寄存器0x09写入值0x21、它在某些电路板上工作、但在少数 电路板上不工作。 我必须在 某些电路板上向0x09寄存器写入两次值0x21、我无法理解为什么在某些电路板上必须两次写入0x09寄存器的问题。 我正在使用具有芯片选择功能的 SPI。 我可以读取写入标签的标签并识别标签。 在某些电路板上、0x09的初始化只有问题、写入0x21后保留默认值。
100个电路板中有90个电路板正常工作仅10个电路板需要我对寄存器0x09进行两次写入。
directCommand = SOFT_INIT;
sendDirectCommand (&directCommand、芯片选择);
directCommand =空闲;
sendDirectCommand (&directCommand、芯片选择);
_TIME_DELAY (5);
directCommand=复位;
sendDirectCommand (&directCommand、芯片选择);
writeRegisterCommand[0]=调制器控制;
writeRegisterCommand[1]= 0x21;//0x21;
writeSingleRegister (writeRegisterCommand、write_register_command_length、chipSelect);
writeRegisterCommand[0]=调制器控制;
writeRegisterCommand[1]= 0x21;//0x21;
writeSingleRegister (writeRegisterCommand、write_register_command_length、chipSelect);
writeRegisterCommand[0]= 0x18;//NFC_TARGET_LEVEL;
writeRegisterCommand[1]= 0x00;
writeSingleRegister (writeRegisterCommand、write_register_command_length、chipSelect);
readRegisterCommand[0]=调制器控制;
readRegisterCommand[1]= 0x00;
(空) readSingleRegister (readRegisterCommand、read_register_command_length、chipSelect);
_TIME_DELAY (5);
TurnRfOn (片选);
writeIsoControlRegister (RFID_MODE_2、芯片选择);
_TIME_DELAY (10);