Hi again:The app-note is old, as it was originally written for the GP32. It copies the high-voltage routines onto the stack, and runs them there. For the GP32, it needs 80 bytes of stack. It will probably be less for the S08 family, due to the embedded state-machine.http://www.freescale.com/files/microcontrollers/doc/app_note/AN2183.pdf
(Alban formatted link)
Message Edited by Alban on 2006-09-11 01:06 PM
HighVoltage equ $100
Here is a snippet of code for the copy process, where flash location HVcode contains the code to be executed from RAM -
HVcode: dc.b ; Sequence of bytes for HighVoltage routine; etc.Copy_code: ldhx #25 ; Number of bytes to copyloop1: lda HVcode-1,x sta HighVoltage-1,x dbnzx loop1 rts
Retrieving data ...