This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Bootloader hardfault

Hi,

Im trying to use BLE DFU Bootloader from examples. I loaded SD8 and then bootloader via nrfStudio (dont have a valid app flashed), but I cant see the device from Android app. I decided to do some debugging via Keil. I recompiled Bootloader with no optimisation and moved bootloader address to 0x3A000.

If I try to debug in Keil it doesnt stop at main, but if i manually press stop it gets into hardfault: image description

Memory settings: image description

Compilation settings: image description

Im using Revision 3 chip. What do I do wrong?

app.zip

hex

Bootloader

Bootloader hex O3

bootloader package without BANK_VALID_APP

Bootloader HEX without BANK_VALID_APP

Memory map according to NRF Studio: Memory map

Bootloader optimisation Level 2 gets stuck on run: image description

Image size > 0x6400

  • Did you also edit the #define BOOTLOADER_REGION_START to 0x3A000 in dfu_types.h?

  • Bjorn, yes I did. The problem was IRAM setting, I had to change it for 16K device and then Im able to see the DFU service. Next problem is that if I try to upload an APP via Android I get: GATT ERROR. If I try to upload same app via MCP and BT dongle it works fine. Any idea?

  • What are your IRAM settings? Is just SD+ BL flashed to the device when you're performing the update or is an application with DFU support also present?

  • I just changed LFCLKSRC from RC_250_PPM_1000MS to 250MS and now it works. (what kinds of effects I get from lowering calibration interval? is it better to use TEMP calibration?) For IRAM I had the following settings: IRAM1: 0x20002C00 0x1380 IRAM2: 0x20003F80 0x80

  • You did not change any other settings? Which smartphone are you using and which Android version? The SoftDevice uses the LFCLK to schedule tasks, so a lower calibration interval (i.e. more accurate clock) would lead to the SoftDevice being able to schedule its task more efficiently. Yes, temperature calibration is better than just calibrating it at a set interval.

1 2 3 4 5 »