adafruit / Adafruit_nRF52_Bootloader

USB-enabled bootloaders for the nRF52 BLE SoC chips

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug] Upgrading bootloader to 0.3.1 using jlink ended up in bootloader loop

akamensky opened this issue · comments

Describe the bug
I decided to upgrade bootloader using my jlink from 0.3.0 to 0.3.1. After writing, I still "can" upload arduino sketches and other compiled binaries, however it is just stuck in bootloader (green led light up) and mass storage volume shows up repeatedly (every couple of minutes) named "FTHR840BOOT" with usual UF2 volume contents. Uploading any UF2 files to that volume results in no effect (no unmount and flash happens, it just stays there as mass volume).

Trying to revert to 0.3.0 has no effect, it still stuck in bootloader loop and shows "new" volume name.

Trying to do UICR erase using nrfjprog or recovery still leads to the same outcome after flashing bootloader.

Set up (please complete the following information)

  • feather_nrf52840_express
  • macos
  • ...

try to upload and uf2 or an sketch via Serial once to settle the DFU setting. It should work afterward with jlink upload

I've recovered board somewhat, but it keeps going to bootloader after running valid sketch for some time (at random it looks).

it is not a new bug, it is CRC checksum of bootloader, you should either flash the CRC16 of the application or disable the checking by writing 0x0001 (if I remembered correctly) to bootloader crc checking address (forget the exact address). Since you just erase and flash with jlink, simplest way is perfrom an DFU via serial or uf2, it iwll write the disable magice to crc checking.

I had this same problem ... and I can confirm that installing a UF2 (I used Circuit Python as the UF2 was pre-generated) solved this bootloop for me just now. What a relief! I thought I had somehow damaged my DK, but it now boots sketches correctly again. YAY!