Jean-Claude Chagnon

Flash Programming on EVB08GB60 (newbee to flash)

Discussion created by Jean-Claude Chagnon on Dec 4, 2007
Latest reply on Dec 5, 2007 by David Payne
Hello to all!
 
I am developping a project using the M68EVB08GB60 board  (MC9S08GB60  3L31R).
 
I have integrated Freescale's flash programming code as described in the HS08 Reference Manual, into my project. This is the same code that is used in the Serial Monitor program. (FlashErase1, FlashProg1, DoOnStack, & SpSub)
 
Every attempt to program a byte or several bytes into the lower flash addresses (1080 to 17FF) has failed. I have check the code against the monitor code for errors, all is good. I have single stepped the code to make sure that data and address were in thier proper places.
 
I am running with a 4Mhz crystal and a 20Mhz buss with FDIV set at 192Khz. System configuration is identical to the monitor (Monitor has been removed and the Flash unsecured)
 
The funny part (I'm not laughing) is that no errors are flagged. The routines terminate with A holding a copy of FSTAT shifted left 2 bits which would put FVIOL & FACCERR at bits 7 & 6 repectively but A reads 0.
 
Help!
 
JC

Outcomes