1347 no sense of Erase Page. What for is it used? newbie

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

1347 no sense of Erase Page. What for is it used? newbie

489 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by PawelWos on Mon Dec 21 21:03:01 MST 2015
What is the sense of Erase Page?
I want to update my firmware, so my steps are as follows:
1. my memory looks like: some pages app1 that is responsible for update; some pages app2; some pages data
2. I run app1 and in app1 move page by page the data to end of flash because I don't know the size of new app2
3. I update app2
4. I move data back to the next page just after the app2.

When I use PrepareSector, Erase Page, Prepare Sector, Write Page some of my data dissapear. (seems like sector is errased but I want to erase just single page).

Do I have to always use sector update basis? So erase backup sector, move data to backup, erase original sector, move data back to original?

What is the sense of Erase Page?

Ps.
I use the IAP programming schema from the sample code included to LPCXpresso, just instead erase/write sector I use erase/write page commands.
标签 (1)
0 项奖励
1 回复

466 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LessThanZero on Tue Dec 29 10:55:53 MST 2015

I'm not sure what this problem is. I will say if portability is an issue, you should avoid use of Erase Page. Not all LPC parts support it. With the PC1347 part, I've encountered an opposite issue with sector erase. In my case, IAP returned success for a sector erase, but the erase actually failed. IAP flash operations require adequate power. I would caution you to ensure you're supplying enough.

Regards,
LessThanZero
0 项奖励