Problem when erasing boot flash.

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

Problem when erasing boot flash.

1,733 Views
jeypi
Contributor I
Hello guys,
 
I'm working with 56F8346 and CodeWarrior 5.6.1.1658.  I'm using the processor expert bean IntFlash and when I try to erase boot flash occurs problems. I debug the code and discover that two flags (PVIOL and ACCERR) of the FMUSTAT register are set when the process of erase boot flash finishes. The code is write below:
 
 BootFlash_SetGlobalProtection(FALSE);
  if(BootFlash_EraseFlash(BOOT_FLASH_BLOCK) != ERR_OK);
  bootError(INDICATE_ERROR_FLASH);
 
bootError was created to report errors. But the two first methods belongs to IntFlash. I don't understand why these flags are set, because I disable the boot area protection. The mass erase command (0x41) is also being write in the FMCMD register. Does anyoney already passed through this situation? Is there any properties that has to be configured in the IntFlash bean ?
 
Thanks,
 
João Paulo.
Labels (1)
Tags (1)
0 Kudos
2 Replies

325 Views
FTSolutions
Contributor III
Hello,

Your code is not executing in bootflash when it attempts to erase it, is it ?   If so, you will
see an error occur .   One cannot reliably erase a section of flash while one is executing from it.
0 Kudos

325 Views
jeypi
Contributor I
Thanks guy,
 
I figured out to erase the boot flash.
 
Thanks,
 
João Paulo.
0 Kudos