cancel
Showing results for 
Search instead for 
Did you mean: 

M24LR64E password command

New.Fish
Associate III

We are using M24LR64E for configuration and event logging, try to use password to protect configuration data area. In the user manual(DM00047008.pdf), in Figure 12 and Figure 13, the password address is 0900h, but in Table13, I2C byte address is 2048, 2052 for different sectors.

Another question is I2C_Write_Lockbit_area command doesn't have I2C data format (such as Figure 12, 13).

ST25DV DVK has source code "st25dv.c" the firmware with all the functions for command codes,

but I can't find the source code for M24LR64E.

1 ACCEPTED SOLUTION

Accepted Solutions
JL. Lebon
ST Employee

​Hello,

First, thank you for using M24LR product.

The I2C password is actually at address 900h (2304 decimal). So you need to set this address in the I2C command shown in figure 13 to present the password.

In addresses 2048 to 2055 decimal (800h to 807h) are the sectors lock bits. Those bits indicates if the sector is locked or not.

For example, if bit 1 of address 800h (2048d) is set to 1, this means that sector 1 is write locked.

If you want to change the value of a sector lock bit, then you mist present the right I2C password by using the command described in figure 12 (pointing at address 900h).

In order to write in the lock bit area, you need to use a standard Write i21C command, as described in Figure 8. The command format described in Figure 12 and 13 are for presenting and writing password only.

For example, to write lock bit of sector 0-7, you will send the following I2C command: Start+AE+08+00+your value here+stop.

Concerning source code for M24LR64E, I will check and come back to you asap.

Best regards.

View solution in original post

1 REPLY 1
JL. Lebon
ST Employee

​Hello,

First, thank you for using M24LR product.

The I2C password is actually at address 900h (2304 decimal). So you need to set this address in the I2C command shown in figure 13 to present the password.

In addresses 2048 to 2055 decimal (800h to 807h) are the sectors lock bits. Those bits indicates if the sector is locked or not.

For example, if bit 1 of address 800h (2048d) is set to 1, this means that sector 1 is write locked.

If you want to change the value of a sector lock bit, then you mist present the right I2C password by using the command described in figure 12 (pointing at address 900h).

In order to write in the lock bit area, you need to use a standard Write i21C command, as described in Figure 8. The command format described in Figure 12 and 13 are for presenting and writing password only.

For example, to write lock bit of sector 0-7, you will send the following I2C command: Start+AE+08+00+your value here+stop.

Concerning source code for M24LR64E, I will check and come back to you asap.

Best regards.