Bangle.js Flash Wear Lifetime #7846
-
Normally I use my bangle as a daily driver, and have it set up so it pulls weather from my phone, and then writes it to weather.json. But doing this every hour to the same file can result in flash wear in less than a year, to my knowledge. How many flash cycles does the Bangle.js have, and is there a way to write to different sectors so flash is not unevenly worn? Additionally, if anyone also does this, and their bangle has lasted for a long time, drop a reply with info about flash wear signs, etc. I really love my Bangle, and want to keep using it for longer than 6-8 months! Thanks so much! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
internal and external flash are different, the storage module supports wear leveling, and the external flash is this one
Thousands of years with 24 writes per day, I would not worry. |
Beta Was this translation helpful? Give feedback.
-
As @enaon says, the Storage module (which is what's used for reading/writing files) has wear levelling. This is done by 'journalling' - it starts at the beginning of flash, and works through to the end - if you update a file, it just marks the old version as deleted and then writes a new one. When flash gets full, it does a 'compact' which takes a while but gets rid of all the deleted files. So you have 8MB flash, with as @enaon says 100,000 cycles. If you blindly write 100 byte files (with a 32 byte header), that allows you to write the file So writing weather.json every hour would give you an estimated flash lifetime of 700,000 years which I think is probably enough :) |
Beta Was this translation helpful? Give feedback.
-
Alright, thank you both so much! |
Beta Was this translation helpful? Give feedback.
As @enaon says, the Storage module (which is what's used for reading/writing files) has wear levelling. This is done by 'journalling' - it starts at the beginning of flash, and works through to the end - if you update a file, it just marks the old version as deleted and then writes a new one. When flash gets full, it does a 'compact' which takes a while but gets rid of all the deleted files.
So you have 8MB flash, with as @enaon says 100,000 cycles. If you blindly write 100 byte files (with a 32 byte header), that allows you to write the file
8000000*100000/(100+32)
= 6 billion times before approaching the minimum supported by the flash chip.So writing weather.json every hour would give …