• I read somewhere that the flash non-volatile memory (disk io) .. has less write cycles durability than read cycles.

    If this is true and I am the user who wants to prolong the life of my bangle.js .. would it be viable to have an option in the settings menu that enables a boolean check inside file write apis? Or would this be too much overhead. If its too much overhead, could it become a compile time flag that we can enable?

    The idea behind this is for the scenario when a lot of apps are installed and used, but one does not have any knowledge if its writing or how often its writing to file. Another solution could possibly be an installation warning or permission similar to android, that the app is allowed to write to file then I would be more careful when installing such app.

    Thanks again for your continued support of this product.

  • Mon 2021.05.17

    re: 'flash non-volatile memory . . . write cycles durability'

    Some good discussion from extremely similar thread topics @d3nd3-o0

    post #18 #19 #20    nrf51288-DK storage     suggestion to read entire thread


    EEPROM byte/bit-wise writing without erasing

  • Hi,

    Espruino does perform a certain amount of wear levelling, so especially if flash memory isn't completely full, I think apps are going to have a very hard time causing any damage to it by repeated writes.

    However, if you really did want to make it read only then I think you could probably just overwrite all of the 'write' functions:

    require("Storage").write = function(){};
    require("Storage").erase = function(){};
    require("Storage").open = function(){}; // this one could be done better so you can still read StorageFiles
    

    That could be a setting - or you could just paste it into the Custom Boot Code app. Of course you have to be careful since after you do that and reboot, the app loader won't be able to write to flash either until you delete require("Storage").write;delete require("Storage").erase;

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Toggle Option File Write Protection [FeatureRequest]

Posted by Avatar for d3nd3-o0 @d3nd3-o0

Actions