Hello all,
I am using the MC9S08QE128 and I am writing a boot loader to copy application code in the lower flash locations. Looking at the serial bootloader in AN2295, I see that the erase and write flash subroutines are copied in RAM and then executed from there. In my boot loader, I try to run the write command without copying the code in RAM, in other words I run it from the boot loader ROM directly since the boot loader must not overwrite itself by design. When I step trace the code with the BDM the write command works everytime but when I let it run full speed (F5 in the TrueTime debugger) the CPU goes wild (I assume it resets) and the debugger gets lost. More precisely I get ILLEGAL_BP and Triggers A & C occurred errors in an unpredictable way.
My question:
Do I absolutely have to copy and run the flash command routines from RAM ? Can you help me otherwise ?
Some sample C code would be terrific.
Thanks,
Pierre
Hello,
For the umpteenth time......
You cannot read/execute from and programme/erase in the same flash array at the same time!!!
RTFM or the forum, or both
I'd really like you to point out the exact location of this saying in the QE128 reference manual or any other manual.
Anyway, you helped greatly.
Thank you.
OK, mea culpa. I found this sentence in the 346 pages of the reference manual. It says it all.
"It is not possible to read from a flash block while any command is executing on that specific
flash block."
Hello,
I'm new with DZ60 and what I've done is to put the minimum ROM reflash routines
in EEPROM (it doesn't takes a lot of space) without interrupt capabilities .
The rest of the reflash routines (decoding of data from a .mot or .s19 file)
are in a protected area of the ROM.
francois