Using CodeWarrior v6.3 with a USB Multi-link to a MC9S08QE8, should I be able to modify FLASH from the CodeWarrior memory window when the target program is halted? Was able to do this with the MC908QB8 but not with the QE8. I'm thinking CodeWarrior may have something to enable for the QE8.
Solved! Go to Solution.
The Reference Manual for the QE8 does not explain Bit 6,the FLS bit, in the System Clock gating Control 2 register (SCGC2). It covers all the other bits but not the FLS bit. If the FLS bit is set to 0, this will disable reading the FLASH high registers in $1820-$182B. Once enabled, FLASH can be erased and reprogrammed in-application.
I was comparing FLASH access to the QB8 MCU using an FSIC emulator which will allow FLASH to be modified but it appears to be emulated FLASH (maybe with RAM on board the emulator). QE8 uses its internal debugger and true FLASH that cannot be editted.
The Reference Manual for the QE8 does not explain Bit 6,the FLS bit, in the System Clock gating Control 2 register (SCGC2). It covers all the other bits but not the FLS bit. If the FLS bit is set to 0, this will disable reading the FLASH high registers in $1820-$182B. Once enabled, FLASH can be erased and reprogrammed in-application.
Hello,
I agree that this does seem to be an omission from the reference manual. However, as a general rule, the state of any bit within a MCU hardware register that is undocumented, or even not properly understood, should always remain at its POR default value. This was obviously not the caes for the instance that you describe.
Regards,
Mac
I would agree if it was not for the reference manual stating to disable gates from the system clock to conserve power and prevent unexpected results. Gating of the system clock is a great design and provides tons of control.