Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

nRF52 DK - Peripheral UART example unmodified fails if CONFIG_BT_SERVICES is enabled.

I'm testing out the Peripheral Uart example on the nRF52 DK with zero modifications using visual studio code.  However, when I run it, it constantly reboots.  When using the debugger, it seems to be that something in the bt_enable() function causes it to SIGTRAP.

This is the output of the debug console

Thread 9 received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Remote target]
z_arm_is_synchronous_svc (esf=0x20006548 <z_main_stack+8>) at C:/ncs/v2.1.0-rc2/zephyr/arch/arm/core/aarch32/cortex_m/fault.c:649
649 uint16_t fault_insn = *(ret_addr - 1);

The RTT doesn't display anything.  And if I use the debugger, it dies in the z_arm_is_synchronous_svc() with a null pointer.

In doing some more digging, it seems the fault occurs with bt_settings_init().  If I turn CONFIG_BT_SERVICES off, the application seems to boot fine.  

This is a new DK and I've not paired it with anything in the past.  Not sure if this is exposing a bug associated with new hardware?

Parents
  • Hi Reza,

    So far I have not been able to find a nRF52-DK which we have not used before at the office.

    If you want, you can read out the flash using

    nrfjprog --readcode flash.hex

    This way, we can have a closer look at the flash in your device, and I can compare it to another different nRF52DK to see if I can find any differences.

    Regards,
    Sigurd Hellesvik

  • I have also seen the same problem:

    Using an nRF52832 (with the nRF52 DK PCA10040).

    nRF Connect SDK 2.1.0 integrated with VS Code

    Using the peripheral_uart code and flashing that from a full erase, it seems that the device resets after passing bl_settings_init();

    However, as  has found, flashing the nvs example code prior to peripheral_uart fixes the reset issue.

    I have added two files:

    flash_beforenvs: This is running a mass erase followed by peripheral_uart

    flash_afternvs: This is running a mass erase, followed by nvs code, followed by peripheral_uart (with no erase in between nvs and peripheral_uart).

    flash_beforenvs.hexflash_afternvs.hex

    There are differences with these files...hopefully you all would know specifically how the diffs matter.

Reply
  • I have also seen the same problem:

    Using an nRF52832 (with the nRF52 DK PCA10040).

    nRF Connect SDK 2.1.0 integrated with VS Code

    Using the peripheral_uart code and flashing that from a full erase, it seems that the device resets after passing bl_settings_init();

    However, as  has found, flashing the nvs example code prior to peripheral_uart fixes the reset issue.

    I have added two files:

    flash_beforenvs: This is running a mass erase followed by peripheral_uart

    flash_afternvs: This is running a mass erase, followed by nvs code, followed by peripheral_uart (with no erase in between nvs and peripheral_uart).

    flash_beforenvs.hexflash_afternvs.hex

    There are differences with these files...hopefully you all would know specifically how the diffs matter.

Children
No Data
Related