what is the meaning difference between security byte define ?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

what is the meaning difference between security byte define ?

462 Views
tigerlo
Contributor III

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.

0 Kudos
1 Reply

369 Views
jorge_a_vazquez
NXP Employee
NXP Employee

Hi Tiger Lo

0xFF and 0xFD in FSEC field represent the same MCU secured state.

pastedImage_1.png

Hope this information could help you.
Best Regards

Jorge Alcala

0 Kudos