Symptoms:
- When running Bootloader + SoftDevice + App (with SoftDevice enabled in the app), The bootloader runs correctly and starts SD. The app is started, but crashes on the first use of USB, RTC timer (used for logging), or SPI.
- When running Bootloader + SoftDevice + App (with no SoftDevice use in the app, and manual VTOR overwrite), the system runs perfectly, except for the disabled BLE
- When running SoftDevice + App (with SoftDevice enabled in the app, no bootloader), everything works, including BLE.
What we’ve tried:
- Make the bootloader run straight to app (at 0x27000). That worked but initializing the Softdevice (present at 0x1000) made application crash. According to fora, this is not the way to go.
- Make bootloader start the SD at default address, and have the app at default address. That gives the result listed in the symptoms.
I have noticed that our custom bootloader initializes some peripherals, that the stock BL does not use. RTC and USB for log (NOT NRF_LOG) and SPI for external flash. I have tried using the NRF_LOG, and not initialize the rtc, but that did not work.
We do not need DFU or Softdevice during boot, as the application handles copying incoming fw updates (over lte) to external flash, and the bootloader successfully copies the application to default address (0x27000) if necessary.
Summary:
- The problem appears to be related to the state of peripherals left by the bootloader, which conflicts with the SoftDevice and app initialization.
- Manual VTOR overwrite and not using the SoftDevice in the app avoids the issue, suggesting a handover/initialization conflict.
- Deinitializing peripherals in the bootloader (to ensure a clean handover) causes a crash, so a safe deinit sequence is not yet found.




