2016-10-23 11:09 AM
Hello,
Would it be possible to erase the flash memory partially before writing data ?
It takes a long time to erase 1sector base. (128kByte or 64kByte)
If possible, could you some advice how to apply?
Thanks.
2016-10-23 11:44 AM
Create a gap in your firmware image so you use the 16kb sectors.
2016-10-24 07:25 AM
Thank you for your reply.
But I don't understand what you mentioned.
If possible, could you be more specific?
Thanks.
2016-10-24 09:10 AM
Break the Load Region for your firmware into TWO separate areas using your Linker Script or Scatter File.
ieRegion 1 0x08000000..0x080003FFF 16KBRegion 2 0x08010000..0x0800FFFFF 1MB-64KBThen you will have THREE 16KB sectors at 0x08004000, 0x08008000 and 0x0800C000 which will erase fasterAlternative create TWO firmwares, a loader that starts at 0x08000000 and an application that starts at 0x08010000Review the IAP examplesReview your tool chain documentationThe sectors have a defined size, and erase times, you can't do a partial erase. You can write multiple instances of the same structure back-to-back in flash, and then find the most recent, a concept call Journalling. Here you only need to erase when you consume all available space, or you can ping-pong between two flash sectors2016-10-24 11:13 AM
Thanks. I will try it.