AnsweredAssumed Answered

MC9S08LL36 Flash Page Query

Question asked by Jacques Lalouette on Jan 17, 2011
Latest reply on Jan 18, 2011 by Jacques Lalouette



I have ported to the MC9S08LL36 after using the MC9S08LL16, for larger ROM space. In an attempt to be having a cunning plan, I am now looking to attempt some Flash manipulation as a form of EEPROM storage.


As such, I am aware that if executing in one flash array, I can only write to a separate array. Now the LL36 refers to 2 separate Flash Array's: "MC9S08LL36: 36,864 bytes (12,288 in flash B and 24,576 in flash A)" - PG69 of MC9S08LL64RM.pdf. Many of the examples in the forum refer to moving the programming instructions into RAM to execute the required operations. Would I be able to run off Flash A for example, and periodically erase/write to Flash B as a method of non-volatile storage in the event of power loss etc?


Then there are some seemingly conflicting application notes I have found where it suggests I could erase just a small block at a time. Would there be a smaller amount I could allocate to erase and use, so that I don't have to wipe an entire flash-array? Like, for example, if I could wipe PPage2 (0x0A000 to 0x0BFFF) (only 8k of FlashA) or even smaller like a 512 byte segment?


Please let me know.

Many thanks!


P.s. (so far I have discovered that you can't initialise FCDIV or write to any of the Flash Registers in the high page (0x1820 to 0x1826) without FLS in SCGC2 being set.... very annoying since there is no mention in the RM (it appears more than one micro's RM is missing this tid-bit)).



I have just seen the following post with someone trying to do something similar:

I was also looking at AN3824SW which was too complicated and lengthy. I saw the attached in the above post which incidently I had just received today from hehehe, so I will try to get it up and running correctly in the morning as I was struggling with FCDIV today.