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

  • No, didnt change anything else. But now I get sometimes GATT error and sometimes not, so at least something. Im using Huawei P8Lite, Android version 5.0.1. I do understand lowering interval gives better calibration:) what about negative effects?

    Meanwhile I tried to upload my own application which is 47K and from MCP I get the following error: Data Size Exceeds Limit. Im trying to upload application only, so even with dual bank it should work. Any idea why it says exceeding size? (in first tests I was using attached HRM hex and zip files). Here is manifest of my update pckg:

    {
        "manifest": {
            "application": {
                "bin_file": "blinky_arm.bin",
                "dat_file": "blinky_arm.dat",
                "init_packet_data": {
                    "application_version": 65535,
                    "device_revision": 65535,
                    "device_type": 65535,
                    "firmware_crc16": 47807,
                    "softdevice_req": [
                        100
                    ]
                }
            },
            "dfu_version": 0.5
        }
    }
    

    Thanks!

  • I think the application version should be 0xFFFFFFF and not FFFF, i.e. you should use the following command when creating the image

    nrfutil dfu genpkg <name-of-image>.zip --application <name of application>.hex --application-version 0xFFFFFFFF --dev-revision 0xFFFF --dev-type 0xFFFF --sd-req 0xFFFE
    

    The negative effects of a lower calibration interval is a higher current consumption in System On mode as the chip has to wake-up more often to perform the calibration. This is described in detail in this DevZone post.

  • I added add.zip generated with your suggestion, but still having the same problem. Could you please have a look at it?

  • Does the blinky_arm example use the S110 SoftDevice? If not, what are the memory settings(IROM & IRAM) of your application?

  • It doesn't use SD itself, only bootloader uses SD for ble updates. IROM 0x18000 0x22000 Iram 0x20002000 0x2000

Related