Bill Allen

MC9S12A64 - FLASH PROGRAMMING

Discussion created by Bill Allen on Jan 23, 2007
Latest reply on Mar 16, 2007 by Lakshman Rao
I am trying to erase, and program the Flash in a MC9S12A64. I have written code in C to erase, and program, the Flash. I transfer the code from Flash to RAM before executing it, and I am having problems erasing and programming portions of the Flash (specifically C000 - C100 and FF00 - FFFF). I have a P&E BDM Interface cable and when I execute my program I can verify that targeted areas of Flash have been erased except for the previosly mentioned areas. What is really peculiar is that the areas are 256 bytes each which isn't even an erase sector (512) bytes. The rest of the sector is erased and reprogrammed without problems. I have verified that the Flash is unprotected and unsecured by checking the FPROT and FSEC registers. Is there any chance CodeWarrior protects these areas when the BDM is active or is adding code to protect these areas? I have tried running the system without the BDM connected and it still fails, but I am unable to view the memory. Any ideas????

Outcomes