Rich Bair

Flash Protection and General 0x3F Fill value

Discussion created by Rich Bair on Jul 4, 2006
Latest reply on Jul 6, 2006 by Jeff Smith
Hello and thanks for reading...
 
1) Are the mc9s12e64 and e128 both the same with a different sector size only.  Is the FTS128K1V1 the correct module to read up on for both of these?
 
2) How do I change FPROT at program time?  Please provide an example...I envision something like...
 
CSEG AT 0FF0DH
DB xxxxxxxxb
 
This is 8051 syntax so I'm not exactly sure how this would look for ach112!
 
3) Here's my *.prm file...(for the '64 portion of the project)
 
-------------8<--------------------------------
/* This is a linker parameter file for the MC9S12E64 */
NAMES
END
SECTIONS
      /* List of all sections specified on the "Build options" tab */
      RAM        = READ_WRITE 0x3000 TO 0x3FFF FILL 0xAA 0x55;
   /* unbanked FLASH ROM */
      ROM_4000   = READ_ONLY  0x4000 TO 0x7FFF FILL 0x3F;
      ROM_C000   = READ_ONLY  0xC000 TO 0xFCFF FILL 0x3F;
      ROM_FLASH  = READ_ONLY  0xFD00 TO 0xFEFF FILL 0x3F;
   /* banked FLASH ROM */
      PAGE_3C    = READ_ONLY  0x003C8000 TO 0x003CBFFF FILL 0x3F;
      PAGE_3D    = READ_ONLY  0x003D8000 TO 0x003DBFFF FILL 0x3F;
   /* PAGE_3E    = READ_ONLY  0x3E8000 TO 0x3EBFFF FILL 0x3F; not used: equivalent to ROM_4000 */
   /* PAGE_3F    = READ_ONLY  0x3F8000 TO 0x3FBFFF FILL 0x3F; not used: equivalent to ROM_C000 */
END
PLACEMENT
      SSTACK, DEFAULT_RAM      INTO RAM;
      CHIMERA_FLASH            INTO ROM_FLASH;
      DEFAULT_ROM              INTO ROM_4000, PAGE_3C, PAGE_3D;
      RTOS, _PRESTART, STARTUP,
      ROM_VAR, STRINGS,
      NON_BANKED, COPY         INTO ROM_C000;
END
INIT _EntryPoint    /* The entry point of the application. This function is generated into the CPU module. */
-------------8<--------------------------------
 
...I'd like to protect my ROM_FLASH sector.  Does FPROT have sector resolution or do I need to protect a larger area?
 
4) I'm using 0x3F for my unused default fill value and hooking the SWI isr to cause a reset after saving some data to ROM_FLASH.  I noticed that my "logical" s-record has the 0x3Fs all over the place but when I use P&E micros log2phy_12 utility to create a physical s-record the 0x3Fs appear to be gone.  Does this sound right?  I'm using the linker to create a *.abs file AND a *.Sx file the latter being the logical s-record (I think).  Can I create the physical one too from the linker without involving the 3rd party log2phy_12 utility?
 
Thanks!

Outcomes