You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Ok, so I just tried compiling an NRF52832DK firmware both with and without the bootloader. The bootloader does appear to add a significant delay (time between when you release the RST button and LED1 flashes) and I just checked the delay comes from a check nrf_dfu_app_is_valid inside Nordic's bootloader code, which is performing a CRC on the code in flash memory.

    I discovered that was being done twice when it wasn't required, and I have just pushed some changes to avoid that - but it's still pretty slow and costly, and even to get my changes would require re-updating the bootloader.

    However the code itself checks first to see if there's a valid CRC, and if the CRC is set to 0 it doesn't bother checking.

    So try running this code in Espruino:

    E.setFlags({unsafeFlash:1})
    require("Flash").write([0,0,0,0], 0x7F000+28)  
    

    It should remove the bootloader delay pretty much completely by stopping it from performing the CRC.

About

Avatar for Gordon @Gordon started