Hi, I am starting a new project using the MC9S08AC16. I need to use the FLASH to store data that is occasionally updated. I upgraded from using an MC68HC908JL8 which had Freescale ROM resident routines for handling flash since you could not program FLASH and execute from it at the same time. This new chip does not seem to have the same limitation on the FLASH. Is this True? I cannot find anywhere in the reference manuals any mention of ROM resident routines or the inability to Program FLASH while executing from FLASH. Can anyone verify this? Thanks!
Hello,
You are not looking hard enough then.
most (all?) S08 do not have any resident flashing routines.
You cannot programme and execute from the same flash array.
This usually means running from RAM while flashing/erasing or running from the other array on some large memory devices.
There is literally 100's of posts here on this.
FLASH as EEPROM is a good search term.
Well that sux! the 908 was easy to work with, this S08 is making me jump through hoops and I have a tight deadline approaching. No ROM resident programs and a reference manual that leaves a lot to be desired. :-( Thanks for the help!
Hello,
You will notice that the datasheet does contain detailed flow diagrams for each of the flash operations. However, only a portion of the code needs to execute from RAM, i.e. from when the flash command is activated by clearing the FCBEF bit, to when it completes, and the FCCF flag becomes set. This is the period when the flash array will be inaccessible.
One of two methods may be used to handle the small amount of RAM-based code -
The attached code demonstrates the second method, which does also require some alteration to the PRM file for the project.
Regards,
Mac