MC9S12 Code memory was erased

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

MC9S12 Code memory was erased

1,839 次查看
hs3401
Contributor I
Now I am using MC9S12DJ128 in our equiptment.
But I have one problem.
The codes I have writed in MC9S12DJ128 flash memory is erased sometimes.
When the code is erased, I write the codes again and it works well.
I don't know why.
This do not happen so often.
But, you know, it can be a big trouble.
 
Please help me to solve this problem!
 
 
标签 (1)
0 项奖励
回复
1 回复

723 次查看
Alban
Senior Contributor II

Hello,

If you do have Flash programming routines inside your MCU, your ERASE function is maybe called.
There is a way to prevent this by securing your Flash, but it doesn't solve the root of the issue and could produce other un-desired behaviour.

Is it the whole Flash being erased or an area in particular ?
May be your code runs away and starts the erase routine. Try and put a special instruction to stop the MCU at start of routine if you can reproduce the issue.

Cheers,
Alban.

0 项奖励
回复