• OK, it is possible to fix this via javascript code if you have firmware that is build with recent changes that can clear and change UICR, however it is a bit tricky, check this conversation http://forum.espruino.com/conversations/­355602/#15601192 setting NFC pins as GPIO is similar problem of updating UICR. However you must erase it completely to unset reset pin configuration.

    In your case you'd need to run this inside same method

    poke32(0x4001e504,2);while(!peek32(0x400­1e400)); // enable flash erase
    poke32(0x4001e514,1);while(!peek32(0x400­1e400)); // erase whole uicr
    poke32(0x4001e504,1);while(!peek32(0x400­1e400)); // enable flash writing
    poke32(0x10001014,0x7A000);while(!peek32­(0x4001e400)); // set bootloader address 
    poke32(0x10001018,0x7E000);while(!peek32­(0x4001e400)); // set mbr settings
    poke32(0x1000120c,0xfffffffe);while(!pee­k32(0x4001e400)); // NFC pins as GPIO
    poke32(0x4001e504, 0);while(!peek32(0x4001e400)); // disable flash writing
    

    I think there is nothing important in UICR except values set in code above but before erasing it you may dump it just in case, for more detail and background see https://github.com/fanoush/ds-d6/wiki/Re­placing-Nordic-DFU-bootloader#espruino-e­xamples (just beware that those examples in the wiki are using NRF.onRestart which is syntax of my older patch, Gordon later added this feature to Espruino as NRF.restart(function()) as mentined in that linked post).

  • I executed the code but it does not change anything. The command for the reset pin still returns 15. In the current state, the bangle boots to the bangle logo. When I try to write to storage, I get "Timeout on jshFlashWrite".

About

Avatar for fanoush @fanoush started