This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Nrf9160dk Build failed for asset tracker application.

  • I am having such a rough on-boarding experience!

    Now with the asset_tracker application built, I am trying to run it without success - it fails with "Fatal fault in ISR! Spinning..".  The "combined" image, containing the bootloader (so-called SPM = secure partition manager) and the actual application, is provided as merged.hex and is loaded to the board with the following command:

    • ninja flash

    After flashing & rebooting, the console output is this:

    ....

    SPM: NS image at 0x8000
    SPM: NS MSP at 0x2002a638
    SPM: NS reset vector at 0xfd55
    SPM: prepare to jump to Non-Secure image.
    Exception occurred in Secure State
    ***** HARD FAULT *****
    Fault escalation (see below)
    ***** BUS FAULT *****
      Precise data bus error
      BFAR Address: 0x50008120
    ***** Hardware exception *****
    Current thread ID = 0x20020470
    Faulting instruction address = 0x12464
    Fatal fault in ISR! Spinning...

    I had already updated to the latest modem firmware: 0.7.0-29.alpha

    But I ran it again... the DFU tool seems to work:

    Start polling IPC.MODEM_CTRL_EVENT to receive root key digest
    Modem responded with a5000001
    Modem root key digest received: 72b3d7c13e549acf08bbc48cb936b9b861e4cbae28a7537c9859a6d945ee9489
    Store IPC DFU executable into shared memory
    Send IPC.APP_CTRL_TASK
    Start polling IPC.MODEM_CTRL_EVENT To receive 'Started' indication from DFU executable
    IPC DFU 'Started' indication from DFU received
    Updating modem firmware

    ...

    Firmware digest received from modem: bf002e90453a1ed0566e8ff81580d78ef8bbd44cdf3886abf51dc853f9443349
    Verification success

    This did not help.  Furthermore, the at_client sample application has never worked - before or after modem DFU - no response received from the modem, all AT commands time out.  Is there any way to debug this?  Does anyone know what's going on?

  • Hi, see my last post below for details, but the built application is producing a hard fault: Fatal fault in ISR! Spinning...

    Any ideas?

  • Fatal fault in ISR! Spinning...

    I don't have much to add other than that I get the exact same results and I would love to know what's going on. I updated all the repos in the nRF Connect SDK to latest, built this with the following command line, and flashed to the board with "ninja flash".

    cmake .. -GNinja -DBOARD=nrf9160_pca10090ns -DBOARD_DIR=C:/Users/me/Desktop/ncs/zephyr/boards/arm/nrf9160_pca10090 -DZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb -DGNUARMEMB_TOOLCHAIN_PATH=C:/gnuarmemb -HC:/Users/me/Desktop/ncs/nrf/applications/asset_tracker -BC:/Users/me/Desktop/ncs/nrf/applications/asset_tracker/build

  • I have figured out what needs to be done, more or less, to get the asset_tracker and the at_client apps running properly on the DK.  In a nutshell, the SPM example, and the asset_tracker application, must be built and loaded separately.  To do this, edit proj.conf and add CONFIG_SPM=n

    Here's why:

    The merged asset_tracker, which is the default type of executable built, and what is loaded with ninja flash, contains an asset tracker binary that is located at flash address 0x8000, but the SPM that is also built and merged into it is likely not jumping to that location (probably to 0x40000, see below).

    In the "unmerged" asset tracker build (when CONFIG_SPM=n is set), the binary is located not at 0x8000, but at 0x40000.  Hmmm, that is interesting.

    When the samples/nrf9160/spm project is built (with -DBOARD=nrf9160_pca10090), then loaded with ninja load, then the "unmerged" asset tracker is built and also loaded with ninja load, it all works.  Finally.  Make sure you build the spm project with the secure board nrf9160_pca10090, and the asset_tracker project with the non-secure board.

    I hope this helps!

Related