• Flash API was previously only for internal nrf52 flash, with Bangle.js Gordon added virtual mapping of SPI flash to 0x60000000 so now it does both based on address, see https://github.com/espruino/Espruino/blo­b/master/targets/nrf5x/jshardware.c#L228­9

    the require("Flash").getFree() gives you flash area that is unused and safe to write. Writing outside it overwrites espruino firmware binary or DFU bootloader. Or Storage as you found out.

    but I'm at a loss to work out what made it better. It's possible the battery ran down and it restarted.

    the SPI code I pasted could wake it up from sleep or setup SPI pins again, but if it worked before then I don't know, power cycling could help of course too

About

Avatar for fanoush @fanoush started