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 Reply
  • Hi Reza,

    Thanks for following up on this!
    And thanks to you other two to also report this!

    I finally got my hands on a new nRF52DK.

    But it works for me out of the box.

    This is what I did:

    1. Open box with nRF52DK.
    2. Plug into computer
    3. Build nRF Connect SDK v2.0.2 Periperal Uart sample for nRF52dk_nrf52832.
    4. Recovery DK using "nrfjprog -recover"
    5. Flash DK using: "west flash"
    6. Bluetooth example works fine.

    You might see that I used the v2.0.2 instead of v2.1.1. This is because I forgot to switch to the newer version when testing.

    But can you test with v2.0.2 and see if you see the same issue in that version? It is likely that the same issue will be present in both v2.0.2 and v2.1.1 though.
    I also tested with v2.1.1 after, and it works fine then. But NVS might have been initialized at that point. And since it is no way to go back in that case it would "void" the attempt if so.

    Regards,
    Sigurd Hellesvik

Children
Related