cancel
Showing results for 
Search instead for 
Did you mean: 

I2C write unsuccessful for system configuration memory

SRath.1
Associate

Hi,

I am working on ST25DV64KC NFC chip. I am trying to write system configuration memory from i2c.

Steps:

1) I have opened i2c security session by sending present password command. I have read I2C_SSO_Dyn register from dynamic register memory and its returning '0x01' means the i2c security session is correctly open.

2) After that I tried to change byte value of LOCK_CFG register to 0x01 by keeping first 14 bytes as it is and 15th byte which is LOCK_CFG to 0x01 using i2c block write.

3) I have read system configuration registers from ST25 NFC tap android app but LOCK_CFG value is not updated to 0x01.

4) For user memory I am able to read and write from i2c side correctly. I am also able to read system configuration memory correctly but failed to write.

Note from datasheet:

I2C security session must first be open, by presenting a valid I2C password, to grant write access to system configuration registers

What could be the cause? Am I following correct procedure to write in system configuration?

1 ACCEPTED SOLUTION

Accepted Solutions
JL. Lebon
ST Employee

Hello,

Your first step looks good. If you read I2C_SSO_Dyn=0x01 it means that the I2C security session is correctly open.

Then something may be wrong with your step 2.

" I tried to change byte value of LOCK_CFG register to 0x01 by keeping first 14 bytes as it is and 15th byte which is LOCK_CFG to 0x01 using i2c block write"

What do you mean by 14 and 15th byte ?

The LOCK_CFG configuration is only 8 bits long.

Can you describe in more detail your i2C write command ?

It should looks like this:

S/0xAE/sA/0x00/sA/0x0F/sA/0x01/sA/P

with S=Start, sA=slave acknowledge bit and P=Stop.

First byte AE is the slave address for system memory.

Next two bytes are the memory address (0x000F for LCK_CFG)

Last byte is the value you want to write in LCK_CFG (0x01)

Best regards.

View solution in original post

1 REPLY 1
JL. Lebon
ST Employee

Hello,

Your first step looks good. If you read I2C_SSO_Dyn=0x01 it means that the I2C security session is correctly open.

Then something may be wrong with your step 2.

" I tried to change byte value of LOCK_CFG register to 0x01 by keeping first 14 bytes as it is and 15th byte which is LOCK_CFG to 0x01 using i2c block write"

What do you mean by 14 and 15th byte ?

The LOCK_CFG configuration is only 8 bits long.

Can you describe in more detail your i2C write command ?

It should looks like this:

S/0xAE/sA/0x00/sA/0x0F/sA/0x01/sA/P

with S=Start, sA=slave acknowledge bit and P=Stop.

First byte AE is the slave address for system memory.

Next two bytes are the memory address (0x000F for LCK_CFG)

Last byte is the value you want to write in LCK_CFG (0x01)

Best regards.