hh lui

HSC08 memory Security and rewrite problems

Discussion created by hh lui on Oct 5, 2009
Latest reply on Oct 5, 2009 by Tony Papadimitriou

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 ?!

Outcomes