Writing error using IAP functions

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

Writing error using IAP functions

2,514 次查看
gbassi
Contributor I

Hello,

I am devoloping a bootloader implementation for LPC4333. For that, I am using the IAP functions to write on Flash.

I am following the workflow I found in the AN10835 (for LPC2000).

I have 2 main questions:

1) Is there a way to write in a part of the sector without previously erasing it all? How?

2) If I prepare the sector and then write over it when there was a previous valid value before, the result of the Chip_IAP_CopyRamToFlash is OK (0x00) but the Flash is not with the correct values on those addresses. What can this be caused by?

Thanks!

标签 (2)
标记 (3)
0 项奖励
回复
4 回复数

2,397 次查看
gbassi
Contributor I

Hello! I came back to this issue, since I am having the problem mentioned in point 2 of original question.

I use the IAP functions to write a page, but then when I check it I see there is no change in the values despite the IAP write function returns 0.

0 项奖励
回复

2,397 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi Gaston Bassi,

Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
1) Is there a way to write in a part of the sector without previously erasing it all? How?
-- It needs to call the erase command prior to writing the flash, otherwise, the previous value will retain portion.

Have a great day,
TIC

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 项奖励
回复

2,397 次查看
gbassi
Contributor I

Hi,

Thanks for your prompt reply.

I understand the only option I have for the erase command is to erase the full sector. That means that if I need to write some information on the 64kB sectors, I would need to have a 64kB RAM buffer to first backup the content that it is already there, make the changes dynamically on RAM and then write the whole 64kB back to the FLASH. And I have only 96kB of total RAM.

Is this operation correct or there is another way to do that?

Thanks

0 项奖励
回复

2,397 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi Gaston Bassi,

Thanks for your reply.
I think the Erase page command can address your worry.
This command is used to erase a page or multiple pages of on-chip flash memory.

pastedImage_1.png

Have a great day,
TIC

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------