AnsweredAssumed Answered

SL3S4011 - How to write a bit in Configuration Word via I²C?

Question asked by Marcel Mayer on May 26, 2020
Latest reply on Jun 1, 2020 by IvanRuiz

Hello everybody,

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:

  1. I set bit 12 to 1 and don´t change the values of the other bits -->  Therefore, I write for Byte 0: 0x42 and for Byte 1: 0x50. Unfortunately, the write operation goes in a loop, with doesn´t ends
  2. Because bit 12 is permanent, for changing the bit has to toogle. So, I write for Byte 0: 0x00 and for Byte 1: 0x10. The write operation runs without an error. When I read the word afterwards, the values in the Configuration Word is unmodified (Byte 0: 0x42, Byte 1: 0x40)
    U32 MEMORYADRESS = 0x2040;
    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[0] = 0x42;
    BufferWrite[1] = 0x50;

    UCODE_X_8K_Status = Ucode_Write(&tUcode,MEMORYADRESS,BUFFERLENGTH,BufferWrite);

    //Version 2: Byte 0: 0x00 Byte 1: 0x10
    BufferWrite[0] = 0x00;
    BufferWrite[1] = 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?

Greetings Marcel