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
  • @mobi: Could you elaborate a little bit more ? My understanding is when you flash the firmware you write some flags (garbage data) to a location on flash.
    On the first time when the firmware starts, it will read that address and if the flags are set, it will clear the flags. So that next time when the device reset or restart it will be able to detect by reading the flags' address again ? If it's correct, I don't see a problem with this approach.

Reply
  • @mobi: Could you elaborate a little bit more ? My understanding is when you flash the firmware you write some flags (garbage data) to a location on flash.
    On the first time when the firmware starts, it will read that address and if the flags are set, it will clear the flags. So that next time when the device reset or restart it will be able to detect by reading the flags' address again ? If it's correct, I don't see a problem with this approach.

Children
No Data
Related