This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to know it started first time after flash firmware.

I'm actually writing some data to the flash. I'm using pstorage api interface.

But whenever I flash the new firmware, I get some garbage data. in my main function I would like to know that, after flashing a new firmware, it started for the first time, so I clear the garbage data, and want to make sure it is not result of a reset or a manual reset etc.

Thanks

Parents
  • Hi Hung, I have implemented similar to what you suggested already, that is, I write some header in flash. On Start of the firmware, I read header, if the header is not correct, that mean entire flash data is not valid and I need to erase that. But I have to waste a page data (140 bytes). Rest of the pages are used for other data and information storage. So, if there is an alternate to wasting page data, that will be great.

Reply
  • Hi Hung, I have implemented similar to what you suggested already, that is, I write some header in flash. On Start of the firmware, I read header, if the header is not correct, that mean entire flash data is not valid and I need to erase that. But I have to waste a page data (140 bytes). Rest of the pages are used for other data and information storage. So, if there is an alternate to wasting page data, that will be great.

Children
No Data
Related