adafruit / Adafruit_Mynewt

Apache Mynewt documentation and test project for the nRF5x family of BLE SoCs
MIT License
8 stars 3 forks source link

bootloader for nrf52 does not enter DFU mode if there is no valid image #31

Open hathach opened 7 years ago

hathach commented 7 years ago

Due to assert somewhere in boot_go(), which won't return an error code, bootloader's main() could not go into DFU mode. https://github.com/adafruit/Adafruit_Mynewt/blob/master/apps/bootloader/src/boot.c#L129

PS: singleboot for nrf51 does not use boot_go(), therefore it is possible to do so.

microbuilder commented 7 years ago

The result being that we can't 'default' to DFU mode when no app image is detected on the device (i.e. only the bootloader is present), which isn't a great user experience. You can still force DFU mode by setting the boot pin to GND, but you have to take the step manually.

This only applies to dual bank flash (nRF52), but I'll post a question on the dev list to see if we can find a solution for this. Thanks for filing the reminder.