Skip to content
  • 0 Votes
    8 Posts
    0 Views
    whitequark@social.treehouse.systemsW
    i have settled on "linear image of data+spare bytes, exactly as it came out of the page buffer"reasoning:while data/spare is a well known distinction, it is somewhat arbitrary (spare bytes aren't any different than data bytes with ECC disabled, except for bad block markers)moreover, wth ECC enabled, there is more internal structure to the page than just data/spareand we can't represent this internal structure because we don't know and the vendor doesn't describe it except free-form in the datasheetthis is exactly how bytes come out of the device when you ask itthis is compatible with existing tooling
  • so!!

    Uncategorized glasgowinterfac
    1
    0 Votes
    1 Posts
    0 Views
    whitequark@social.treehouse.systemsW
    so!! i am excited!!! to have finally finished the complete reimplementation of the #GlasgowInterfaceExplorer memory-25x applet for managing SPI NOR flashes. it is called memory-25q and it took an enormous amount of effort, because i have decided to Build It Properlywant to jump to the docs (there are a lot of docs, including on the fundamentals of (Q)SPI flashes) or read the code? here we go:pull request introducing memory-25qquad SPI controller APIframework for managing QSPI-style memoriesthe CLI of the new memory-25q appletand, finally, the API of the new memory-25q appletnow, why did i do that? two reasons. memory-25x is one of the first applets i made, ~7 years ago, and i had no idea what kind of UI i should be building (yet). to make it worse, i thought that SPI NOR flashes were "easy", you could "just send a few bytes and that's basically it".nothing could be further from truth. first off, SPI NOR flashes don't really exist—there is no spec, no standard organization that can say "no, your thing is not compliant", no order to any of this. every vendor does whatever they want, and then every other year JEDEC writes down all of the unhinged shit they did. here is the list of six incompatible methods to turn a single bit on or off, as a warmupsecond, SPI flashes have an absolutely absurd diversity of framings. you cannot even express it without building a meta-framework for abstracting over all the ways people have come up to squeeze 8 bits into 2 or 4 wires. then on top of it you have to manage a bunch of global state that affects framing in subtle or sometimes really fundamental ways, without having any way to find out that you've made an error besides "you compare the actual data with the expected data (or its checksum) and it is not equal"anyway, the new applet should be excellent at any daily task and at least okay at >90% of the exotic ones. also it's easily generalized for the (completely incompatible on the wire) QSPI NAND 25N series, octal or DTR variants, etc