Writing to Flash memory kills MCU

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

Writing to Flash memory kills MCU

跳至解决方案
384 次查看
sm0khey
Contributor III

Hello! I am trying to save a variable, which a user input, to the flash memory. I am using MC56F82... and the IFsh1 library. I disable the events and then erase the block and then write to the flash, but my MCU keeps dying, i have to restart it and flash it again to get it working. Any ideas on how to do it correctly?

标记 (3)
0 项奖励
1 解答
324 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

This is the flash example code based on CodeWarrior for DSP56800E ver8.x.

Pls refer to it.

Regarding your question, the flash erasing/programming code must be located in flash and copied to p RAM, you have to run the erasing/programming code in  RAM to manipulate the flash.

Hope it can help you

BR

XiangJun Rong

在原帖中查看解决方案

4 回复数
325 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

This is the flash example code based on CodeWarrior for DSP56800E ver8.x.

Pls refer to it.

Regarding your question, the flash erasing/programming code must be located in flash and copied to p RAM, you have to run the erasing/programming code in  RAM to manipulate the flash.

Hope it can help you

BR

XiangJun Rong

320 次查看
sm0khey
Contributor III

Thank you for the help!

0 项奖励
323 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

I attach the code here.

BR

XiangJun Rong

 

0 项奖励
349 次查看
sm0khey
Contributor III

up

0 项奖励