I´m working with the SL3S4011 RFID-EEPROM and I want to modified the bit for read protect user memory (Bit 12) in the Configuration Word via I²C. Reading the Configuration Words works without an error (Byte 0: 0x42, Byte 1: 0x40).
I have had two attempts so far:
U32 MEMORYADRESS = 0x2040; U32 BUFFERLENGTH = 2; U8 BufferRead[BUFFERLENGTH]; U8 BufferWrite[BUFFERLENGTH]; UCODE_X_8K_Status = Ucode_Read(&tUcode,MEMORYADRESS,BUFFERLENGTH,BufferRead); //Version 1: Byte 0: 0x42 Byte 1: 0x50 BufferWrite = 0x42; BufferWrite = 0x50; UCODE_X_8K_Status = Ucode_Write(&tUcode,MEMORYADRESS,BUFFERLENGTH,BufferWrite); //Version 2: Byte 0: 0x00 Byte 1: 0x10 BufferWrite = 0x00; BufferWrite = 0x10; UCODE_X_8K_Status = Ucode_Write(&tUcode,MEMORYADRESS,BUFFERLENGTH,BufferWrite);
For understanding my problem easily, I modified the code a little bit.
I tested the I²C driver and writing the User-Memory works. So, I believe my I²C driver is not the problem. How can I change the bit for read protect user memory with the I²C interface?
Sorry, but what do you mean that it goes in a loop, could you please elaborate more on this description, please. I mean, is it because of your function implementation that it is cycling it or because the UCODE I²C enters into a "cycle" state?