Unable to modify FLASH from CodeWarrior v6.3

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Unable to modify FLASH from CodeWarrior v6.3

跳至解决方案
1,979 次查看
lazde
Contributor II

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.

标签 (1)
0 项奖励
回复
1 解答
1,384 次查看
lazde
Contributor II

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.

在原帖中查看解决方案

0 项奖励
回复
4 回复数
1,384 次查看
lazde
Contributor II

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.

0 项奖励
回复
1,385 次查看
lazde
Contributor II

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.

0 项奖励
回复
1,384 次查看
bigmac
Specialist III

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

 

0 项奖励
回复
1,384 次查看
lazde
Contributor II

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.

0 项奖励
回复