Skip to main content
AntonioTesta
Associate
December 12, 2020
Question

How to count and keep how many uploads has been done on STM32F103C8T6´s flash memory ?

  • December 12, 2020
  • 2 replies
  • 778 views

I would like to implement a bootloader for STM32F103C8T6 that would count and keep in a special protected area how many uploads has done over its flash memory. Does anybody would give some some reference about this matter ? Thanks a lot. Antonio

This topic has been closed for replies.

2 replies

Tesla DeLorean
Guru
December 12, 2020

You could journal a sequence number over an available sector, and perhaps also keep track in an unused vector table entry on the app as it is written/updated each time.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
AntonioTesta
Associate
December 12, 2020

Yes. I already have in my app a counter for write cicles done under app. But since the app can be uploaded many many times, I want to have a more accurated flash life expectation... That is why I thought in increment (and keep) the counter in the bootloader too...

Tesla DeLorean
Guru
December 12, 2020

Really don't want to erase the loader, but you can journal a sequence count or tags.

Perhaps use NVRAM/RTC if available

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..