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

nrf52840-DK device fails to boot with Unaligned memory access error

Hi,

Problem: nrfconnect  device fails to boot with Unaligned memory access error

  • expected behavior: nRF52840-DK chip device should boot normally

  • actual behavior: nRF52840-DK chip device fails to boot normally and keeps continuously re-booting with Unaligned memory access error

  • steps to reproduce:
    1. build connectedhomeip/examples/lock-app/nrfconnect for nRF52840-DK board
    2. Flash zephyr.hex file in nRF52840-DK with nRF Connect v3.5.0 Windows application
    3. Power up

  • system configuration: lock-app/nrfconnect for nRF52840-DK board

  • screenshots, images, logs, etc.

nRF5280-DK board fails to boot normally and keeps reboot automatically with Error messages

Boot Log
Z+
W+▒ещ5
I: 8 Sectors of 4096 bytes
I: alloc wra: 0, ff0
I: data wra: 0, 0
*** Booting Zephyr OS version 2.4.99 ***
I: Init CHIP stack
I: SoftDevice Controller build revision:
I: e5 c7 9c d9 91 00 1d 66 |.......f
I: ea fb 6e 7b 98 2f 42 0d |..n{./B.
I: f1 60 93 c8 |.`..
I: Starting CHIP task
I: Init Thread stack
I: 496[DL] OpenThread started: OK
I: 499[DL] Setting OpenThread device type to MINIMAL END DEVICE
I: 505[ZCL] Using ZAP configuration...
I: 508[ZCL] deactivate report event
D: 511[IN] TransportMgr initialized
I: 515[IN] local node id is lu

D: 518[DL] SetAdvertisingEnabled(true)
E: ***** USAGE FAULT *****
E: Unaligned memory access

E: r0/a1: 0x2000583d r1/a2: 0x0006f8e6 r2/a3: 0x0000001a
E: r3/a4: 0x0006f901 r12/ip: 0xffffffff r14/lr: 0x00048e8f
E: xpsr: 0x21000000
E: Faulting instruction address (r15/pc): 0x0004ad56
E: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 0
E: Current thread: 0x20002eb0 (main)
E: Resetting systemI: nRF5 802154 radio initialized
I: 8 Sectors of 4096 bytes
I: alloc wra: 0, ff0
I: data wra: 0, 0

Kindly suggest what could be the issue and how to resolve it? Thank You very much

Parents
  • Hello, 

    I will need some time to look into the CHIP documentation and test this my self, as I have never used it before.

    The documentation of the CHIP lock-app states the following:
    "The example requires the nRF Connect SDK v1.4.0. You can either install it along with the related tools directly on your system or use a Docker image that has the tools pre-installed."
    "The application requires the nRF Connect SDK v1.4.0 to work correctly."

    Have you installed NCS v1.4.0? Have you followed instructions given in "Using native shell for setup"?

    Kind regards,
    Øyvind

  • Hello,

    I performed following steps before building lock-app sample.

    1. nRF SDK Download & Installation

    cd ~/

    mkdir ncs

    cd ncs

    ~/ncs$ west init -m github.com/.../sdk-nrf --mr master

    ~/ncs$ west update

    ~/ncs$ west zephyr-export

    2. Zephyr SDK Download

    cd ~/

    $wget github.com/.../zephyr-sdk-0.12.2-x86_64-linux-setup.run

    $chmod +x zephyr-sdk-0.12.2-x86_64-linux-setup.run

    $./zephyr-sdk-0.12.2-x86_64-linux-setup.run -- -d ~/zephyr-sdk-0.12.2

    3. Set Zephyr Environment

    Run following command

    $souce ~/ncs/zephyr/zephyr-env.sh <= This will set ZEPHYR_BASE environment variable

    4. Build lock-app sample application

    cd /<connectedhomeip>/examples/lock-app/nrfconnect

    <connectedhomeip>/examples/lock-app/nrfconnect \$west build -b nrf52840dk_nrf52840

    After step#4, zephyr.hex file is successfully generated. Following is the final Build Log.

    Build Log

    =====================================

    [535/575] Performing configure step for 'chip-gn'
    Done. Made 49 targets from 63 files in 470ms
    [536/575] Performing build step for 'chip-gn'
    [228/228] stamp obj/ABS_PATH/home/chip/...config/nrfconnect/chip-gn/default.stamp
    [570/575] Linking CXX executable zephyr/zephyr_prebuilt.elf
    Memory region Used Size Region Size %age Used
    FLASH: 471532 B 1 MB 44.97%
    SRAM: 154537 B 256 KB 58.95%
    IDT_LIST: 200 B 2 KB 9.77%
    [575/575] Linking CXX executable zephyr/zephyr.elf

    =======================================

    Please let me know if anything is missed. Thank You

    BR,

    -Anupam Roy

  • Hi, 

    Have you tried to build the samples under nrf\samples\connectedhomeip? I'm currently having some issues with my NCS install, but working on a fix.

    Kind regards,
    Øyvind

  • Hello,

     I did not try to build these samples. I will give it a try.

    BR,

    -Anupam Roy

Reply Children
No Data
Related