Hi sir,
const volatile unsigned char NVPROT_INIT @0x0000FFBD = 0xDE;
const volatile unsigned char NVOPT_INIT @0x0000FFBF = 0xF0;
void IC_Protect_Disable(void)
{
unsigned int data_addr =0xFFB0;
FCNFG_KEYACC = 0x1;
*(unsigned char *)data_addr = 0x0;
data_addr++;
*(unsigned char *)data_addr = 0x1;
data_addr++;
*(unsigned char *)data_addr = 0x2;
data_addr++;
*(unsigned char *)data_addr = 0x3;
data_addr++;
*(unsigned char *)data_addr = 0x4;
data_addr++;
*(unsigned char *)data_addr = 0x5;
data_addr++;
*(unsigned char *)data_addr = 0x6;
data_addr++;
*(unsigned char *)data_addr = 0x7;
data_addr++;
FCNFG_KEYACC = 0x0;
}
==============================================
I used JM8 in my project. and the protect blocks from E000~FFFF .
Inside that blocks, rewrite process is no allow due to scurity.
but when i call "IC_Protect_Disable" show as above, the block is also unlock,
how can i do ?!
1. Flash is not readable while KEYACC is set. Thus your IC_Protect_Disable() routine should run from RAM.
2. Backdoor unsecure is supposed to allow R/W access via BDM pin. Backdoor unsecure doesn't disengage flash write protection.