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

settings_subsys_init() causes a bus fault on nrf52840-Dongle

I am trying to adapt the zigbee light_bulb sample to run on nrf52840-Dongle which does not have a QSPI flash chip.  I see that it crashes unexpectedly during settings_subsys_init():

I: nRF5 802154 radio initialized
*** Booting Zephyr OS build v2.7.0-ncs1 ***
I: Starting ZBOSS Light Bulb example
E: XXX before settings_subsys_init
I: No GC Done marker found: restarting gc
E: ***** BUS FAULT *****
E: Imprecise data bus error
E: r0/a1: 0x00000000 r1/a2: 0x00000000 r2/a3: 0x00000000
E: r3/a4: 0x00000000 r12/ip: 0x00000000 r14/lr: 0x00019d3f
E: xpsr: 0x61000000
E: s[ 0]: 0x00000000 s[ 1]: 0x00000000 s[ 2]: 0x00000000 s[ 3]: 0x00000000
E: s[ 4]: 0xffffffff s[ 5]: 0x00000000 s[ 6]: 0xffffffff s[ 7]: 0x00000000
E: s[ 8]: 0x00000000 s[ 9]: 0x00000000 s[10]: 0x00000000 s[11]: 0x00000000
E: s[12]: 0x00000000 s[13]: 0x00000000 s[14]: 0xffffffff s[15]: 0xffffffff
E: fpscr: 0xba672f9d
E: Faulting instruction address (r15/pc): 0x00007bd8
E: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 0
E: Current thread: 0x20001538 (unknown)

Do I need to manually alter the way that the persistent Zigbee pairing data is stored in flash?  partitions.yml says:

zboss_nvram:
address: 0xf5000
end_address: 0xfd000
placement:
after:
- app
align:
start: 0x1000
region: flash_primary
size: 0x8000
zboss_product_config:
address: 0xfd000
end_address: 0xfe000
placement:
after:
- zboss_nvram
region: flash_primary
size: 0x1000

  • Hi,

    Do I need to manually alter the way that the persistent Zigbee pairing data is stored in flash?

    Yes, this is correct. The bootloader on the dongle starts at address 0xE0000 and occupies the rest of the flash, but from partitions.yml you see that the partitions for zboss_nvram and zboss_product_config start at 0xF5000 and 0xFD000.

    To fix this all you need to do is to create static partitions, as I have done in my own project here: light_bulb_dongle. This is done by creating a file called pm_static_nrf52840dongle_nrf52840.yml with the following:

    EMPTY_0:
      address: 0x0e0000
      end_address: 0x100000
      region: flash_primary
      size: 0x20000
    # SRAM reserved to be used by the nRF5 Bootloader
    EMPTY_1:
      address: 0x20000000
      end_address: 0x20000400
      region: sram_primary
      size: 0x0400
    

    This file should be added in your project folder, so in the same location as CMakeLists.txt and prj.conf. This way, when you build the project for the dongle the file will be automatically added in the build. 

    I just tested using this in the light bulb sample myself, and with it my dongle was able to start up and join a Zigbee network.

    Best regards,

    Marte

Related