Hello,
Thank you for using the St25DV04K.
For I2C access protection to memory, the I2CSS register should be programmed properly and security session must be opened and closed correctly.
Here are the steps:
- Present I2C password : this opens I2C security session, and you can write I2C registers.
- Configure areas size: write values in ENDA1, ENDA2 and ENDA3 registers.
- Configure I2C memory protection: write I2CSS register with correct value.
- Close I2C security session: present wrong I2C password or VCC off.
- Access to protected I2C memory => fails.
- Present I2C password (open I2C security session)
- Access to protected I2C memory => works
Here is an example:
- Present I2C password : by default all 0
- configure Areas:
- write ENDA1=00: area 1 is from byte 0000h to 001Fh
- write ENDA2=01: area 2 is from byte 0020h to 003Fh
- write ENDA3=02: area 3 is from byte 0040h to 005Fh
- area 4 is from 0060h to 007Fh (please refer to table 4 in datasheet for area size configuration)
- write I2CSS = E4h
- Area 1 will be always readable and always writable
- Area 2 will be always readable, but can be written only if security session is opened
- Area 3 will be always writeable, but can be read only if security session is opened
- Area 4 can be read or written only is security session is opened
- close security session: present wrong password, i.e. all FF
- Access to memory with security session closed:
- Area 1 access with security session closed:
- read byte 0000h => should work
- write byte 0000h => should work
- Area 2 access with security session closed:
- Read byte 0020h => should work
- write byte 0020h => should fail
- Area 3 access: with security session closed
- read byte 0040h => should fail
- write byte 0040h => should work
- Area 4 access: with security session closed
- read byte 0060h => should fail
- write byte 0060h => should fail
- Access to memory with security session opened:
- Present correct password (by default all 0)
- Area 1 access with security session opened:
- read byte 0000h => should work
- write byte 0000h => should work
- Area 2 access with security session opened:
- Read byte 0020h => should work
- write byte 0020h => should work
- Area 3 access: with security session opened
- read byte 0040h => should work
- write byte 0040h => should work
- Area 4 access: with security session opened
- read byte 0060h => should work
- write byte 0060h => should work
- Close security session again: present wrong password or VCC off.
Do not forget to close the security session, otherwise the access remains opened.
This is for I2C access to memory and registers.
I2C security session and I2CSS register have no effect on RF access control. For RF, you must use the RFAxSS registers.
Hope this helps.
Best regards.
JL.