I've skimmed through the espruino firmware source code and noticed that the flash access is abstracted between the internal flash and the external. I am not experienced in hardware but am curious to develop my understanding of how it works.
I read that writing to flash is done by removing 1's from the cells and that to write 1's an entire block must be reset to 1's. My information source(youtube) described a hierarchy of dies->planes->blocks->pages. My question to you is, how much of this regulation is controlled automatically by the flash controller and how much has to be programmed into the firmware by eg. yourselves. My impression from the Espruino source code is that its all automatically handled?
I did some research and came under the assumption that the external flash has 10x more endurance for erase/writes ( 10,000 compared to 100,000 ) although this cannot be confirmed because we don't have access to the exact datasheets. I used the Macronix MX25 as described on this forum for being a close match. If the external can handle more write/erase wear, is it being prioritised on the firmware level or is the internal firmware going to be hit harder because its address space that refers to it is smaller. If one starts small and increments up... Should i be concerned?
If I upload a file with same name that already exists to flash, does the file get moved to new cells?
Please correct me on all accounts, I'm here for learning.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hello espruinoers.
I've skimmed through the espruino firmware source code and noticed that the flash access is abstracted between the internal flash and the external. I am not experienced in hardware but am curious to develop my understanding of how it works.
I read that writing to flash is done by removing 1's from the cells and that to write 1's an entire block must be reset to 1's. My information source(youtube) described a hierarchy of dies->planes->blocks->pages. My question to you is, how much of this regulation is controlled automatically by the flash controller and how much has to be programmed into the firmware by eg. yourselves. My impression from the Espruino source code is that its all automatically handled?
I did some research and came under the assumption that the external flash has 10x more endurance for erase/writes ( 10,000 compared to 100,000 ) although this cannot be confirmed because we don't have access to the exact datasheets. I used the Macronix MX25 as described on this forum for being a close match. If the external can handle more write/erase wear, is it being prioritised on the firmware level or is the internal firmware going to be hit harder because its address space that refers to it is smaller. If one starts small and increments up... Should i be concerned?
If I upload a file with same name that already exists to flash, does the file get moved to new cells?
Please correct me on all accounts, I'm here for learning.