HSC08 memory Security and rewrite problems

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

HSC08 memory Security and rewrite problems

1,386 Views
jy
Contributor I

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

Labels (1)
0 Kudos
Reply
2 Replies

569 Views
kef
Specialist I

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.

 

0 Kudos
Reply

569 Views
tonyp
Senior Contributor II
3. Values 0x0000 and 0xFFFF are not permitted as backdoor keys (at least for some parts, like the QE128).
0 Kudos
Reply