cancel
Showing results for 
Search instead for 
Did you mean: 

i2c present password command

eturmel
Associate
Posted on July 28, 2016 at 11:38

Hello,

I want to modify sector security status area to lock all sectors against RF access (R/W)

To do so, I have to send a I2C present password command and then write the sector security status area.

I never set the i2c password, so it should be 0000 0000h

But after presenting this password, I can't modify sector security status area.

The sector security status area is still the same (I can read it)

Is it possible to have a sample code or/and other documentation than AN3002 Description of the M24LRxx-R....

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
Rene Lenerve
ST Employee
Posted on August 16, 2016 at 11:39

Hello turmel.eric,

Not knowing your development platform and environment I will orient you to the source code base on the STM32 NUCLEO platform and M24LR expansion board. You will find

http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-expansion-software/x-cube-nfc2.html

code and M24LR drivers under Cube environment.

You will find functions (in m24lr.c file) for present password, i2c_writle_lock bit and RF Sector Security that can help you for your development.

If you didn't write password it is still set to 0000 0000h, you can try to modify another register to see if you have this problem only for RF sector security or with the present password feature also.

Another information to take care is to access system area you need to set the E2 bit in the device address, write in user area send A6h (A7h for read) on device select, write in system area send AEh (AFh for read) on device select.

Have a nice day,

Kind Regards.

View solution in original post

1 REPLY 1
Rene Lenerve
ST Employee
Posted on August 16, 2016 at 11:39

Hello turmel.eric,

Not knowing your development platform and environment I will orient you to the source code base on the STM32 NUCLEO platform and M24LR expansion board. You will find

http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-expansion-software/x-cube-nfc2.html

code and M24LR drivers under Cube environment.

You will find functions (in m24lr.c file) for present password, i2c_writle_lock bit and RF Sector Security that can help you for your development.

If you didn't write password it is still set to 0000 0000h, you can try to modify another register to see if you have this problem only for RF sector security or with the present password feature also.

Another information to take care is to access system area you need to set the E2 bit in the device address, write in user area send A6h (A7h for read) on device select, write in system area send AEh (AFh for read) on device select.

Have a nice day,

Kind Regards.