AnsweredAssumed Answered

RF Mode Sector Security Status

Question asked by on.brian on Sep 20, 2016
Latest reply on Sep 20, 2016 by on.brian
I am trying to change the sector security status of my RF sectors in I2C mode using the provided m24lr drivers, but it’s not working. Below is my code:

M24LR_SECTOR_SEC sss_write;
M24LR_SECTOR_SEC sss_read;
// unlock sector
sss_write.SectorLock = 0;
// use first password
sss_write.PassCtrl = 1;
// cannot write without password
sss_write.RW_Protection = 0;
 
NFCTAG_StatusTypeDef status = NDEF_OK;
uint32_t password = 0;
 
// present password
status = BSP_NFCTAG_GetExtended_Drv()->PresentI2CPassword(password);
 
wait_ms(1000);
 
for (int i = 0; i < 4; i++)
{
    status = BSP_NFCTAG_GetExtended_Drv()->WriteSSSx((uint8_t)i, &sss_write);
    BSP_NFCTAG_GetExtended_Drv()->ReadSSSx((uint8_t) i, &sss_read);
}


I first present the I2C password, which should be 0 because I haven’t changed it since receiving it. Afterward, I use the m24lr functions to write/read each sector’s SSS. However, even though the code runs and the status is always NDEF_OK, the sector security statuses never change. How can I fix this? I am using the Nucleo-NFC02A1 tag, which uses M24LR04E-R.  

Outcomes