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.
Any help appreciated.
Added p/n to subject.