David Boyd

Erasing Flash Causes Processor Reset = MC9S08AC128

Discussion created by David Boyd on Aug 25, 2009
Latest reply on Aug 31, 2009 by Gustavo Oioli de Campos

I'm programming the flash from user code in an MC9S08AC128. Byte programming works OK, but when I page erase the flash the processor resets.  I am using the DoOnStack routines provided by Freescale in the HCS08Family Reference Manual.


I first tried using my own routines first before trying the Freescale routines. They also byte programmed well, but also caused the processor to crash on Page Erase.


I have used these routines before on other processors (SH8 and QG8), and they worked OK.  I've tried diabling the COP watchdog on the AC128, but this didn't help.


Perhaps this is related to the paging feature in the AC128.  I have tried page erasing in Page 0 and 1. 


Help appreciated.


Any help appreciated.


Added p/n to subject.

Message Edited by NLFSJ on 2009-08-25 10:52 AM