AnsweredAssumed Answered

Flash Security byte in Flash Config Field and FSEC are not the same

Question asked by Oliver Kubat on Nov 28, 2016
Latest reply on Nov 30, 2016 by Oliver Kubat



I use the TRK-S12ZVFP64 development board and CodeWarrior Version: 10.6.4


I want to secure the MCU and unsecure it via Verify Backdoor Access Key Command.


I configured the Flash Config Field as follow:


/* configure flash configuration field */
const unsigned char FCF_FlashConfigurationField_a[] @0xFFFE00 = {0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFA, FLASHSECURITYBYTE };


Before i execute the Verify Backdoor Access Key Command i check the FSEC register like that

   if(((*(unsigned char *)0x0381)) == FLASHSECURITYBYTE )
        /* do something */

But FLASHSECURITYBYTE and the Value in the FSEC register arent the same...


When i use 0xBD for FLASHSECURITYBYTE, then 0xFF is stored in FSEC (MCU secured but no Backdoor Access Key)

When i use 0xBC or 0xBF for FLASHSECURITYBYTE, then 0xBE is stored in FSEC (MCU is unsecured)


That's why the Verify Backdoor Access Key Command fails every time (ACCERR is set in FSTAT)

Is there any solution to get 0xBD in the FSEC register?