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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

1,509 Views
m_mayer
Contributor I

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;
    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[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

Labels (1)
2 Replies

953 Views
Lemer
Contributor I

Hello,

I have a similar issue. I can read to configuration word but a write does not change anything. The write terminates correctly but the word has not the new value...

Do you have any suggestion?

For information the lock register has the value 0x05400540. Is it the problem?

I tried to change this lock register too but always the same problem: written occured correctly but the values are not changed...

It seems that this topics is quite frequent in this forum but not correct answer from support...

Best regards

Mich

0 Kudos

1,454 Views
IvanRuiz
NXP Employee
NXP Employee

Hello,

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?

Thank you,

Ivan.

0 Kudos