Tony Papadimitriou

Flash programming for GB60 and compatibles

Discussion created by Tony Papadimitriou on Apr 1, 2006
Latest reply on Apr 21, 2006 by Mark Hotchkiss
Hi all,
I'm trying to minimize the RAM size needed to program the flash of a GB60, QG8 or compatibles.  So, I made some changes to working code, and it no longer works.  But I want to understand why.
From various documentation (GB60, QG8, HCS08) about flash programming, it seems that a flash command is actually 'launched' when the FCBEF bit in FSTAT is written with 1.  It should then be possible to do all previous steps (i.e., latching the address and data "sta ,x", writing to FCMD) from Flash, not RAM.  Only the steps of writing FCBEF in FSTAT (that launches the command) and waiting for the FCCF to become set (that marks the end of a command) should be executed from RAM.
It isn't very clear when a Flash programming session actually begins, so that Flash is no longer available for running code from it.  Any ideas or better reference that explains the steps in greater detail?