AnsweredAssumed Answered

what is the meaning difference between security byte define ?

Question asked by Tiger Lo on Sep 26, 2017
Latest reply on Sep 28, 2017 by Jorge Antonio Alcala Vazquez

What is the difference between if security protect byte FSEC set to 0xFF & 0xFD ?
//FSEC          EQU     0xFE ; no security in flash

//FSEC          EQU     0xFF ; security protect
FSEC EQU 0xFD ; security protect

 

When I set FSEC to 0xFD , my program execution have something difference with 0xFE(No security)when FSEC setting to 0xFD, the program can't execute correct ? I am very confusing ?

 

#define FLASH_TEMPERATURE_DELTA_ADDR 0x7C00

 

FlashAddr=(uint8_t *) FLASH_TEMPERATURE_DELTA_ADDR;
FlashHeader=*FlashAddr;
#if defined (DEBUG_SYATEM_STARTUP)
PRINTF("\r\n FlashHeader = %x , FlashAddr = %x\r\n",FlashHeader,FlashAddr);
#endif
if(FlashHeader!=FLUSHBUFFER_HEADER)
{
GPIO_DRV_ClearPinOutput(kGpioRedLED);
OSA_TimeDelay(2500);
GPIO_DRV_SetPinOutput(kGpioRedLED);
} else {
LED_toggle_red_led(1);
}

 

The above program can't be executed correctly, I only read  0x7c00 data & light LED , it is very simple.

Outcomes