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

nRF52811: Device won't start advertising after flash - only works through GDB reset cycle

Description:

I'm having an issue with my nRF52811 custom board where the device won't start BLE advertising after programming, but it works after cycling through GDB monitor resets multiple times.

Hardware:

  • nRF52811_xxAA on custom board
  • J-Link OB-nRF5340 debugger
  • External power supply

Software:

  • BLE DFU application (SoftDevice + Application + Bootloader)
  • SoftDevice: S112 (version: please specify)
  • SDK: please specify version
  • IDE: SEGGER Embedded Studio
  • Toolchain: arm-none-eabi-gcc

Problem:

The device does NOT start advertising after:

  • Programming via nrfjprog --program merged.hex --reset
  • Flashing through nRF Connect Programmer app
  • Power cycling the custom board
  • Running nrfjprog --reset

The device DOES work after:

  • Starting J-Link GDB Server: JLinkGDBServer -device nRF52811_xxAA -if SWD -speed 4000
  • Connecting with GDB: target extended-remote localhost:2331
  • Running monitor reset + continue combo 2-3 times
  • Once advertising starts through this method, it continues to work even after disconnecting the debugger
  • But stops working again after power cycle

Errors Encountered:

Sometimes I get:

warning: ARM M in lockup state, stack unwinding terminated.
```

Other times:
```
(gdb) continue
Continuing.
Program received signal SIGTRAP, Trace/breakpoint trap.
0x20006000 in ?? ()
(gdb) backtrace
#0  0x20006000 in ?? ()
#1  0x2000032e in __reserved_ram_start__ ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
```

When this happens, I need to:
1. Run `nrfjprog --recover`
2. Reflash the image
3. Try the GDB reset combo again



Questions:

  1. Why does the device only start properly after multiple GDB monitor reset cycles?
  2. The crash at 0x20006000 (RAM address) suggests the PC is jumping to invalid memory - is this a memory layout issue?
  3. Could this be related to SoftDevice initialization timing?
  4. Is there a difference between nrfjprog --reset and J-Link's monitor reset that could explain this behavior?
  5. Should I add delays after SoftDevice initialization or clock startup?

What I've Tried:

  • Different reset methods
  • Reflashing multiple times
  • Using --recover before programming

Any insights would be greatly appreciated!

if i try nordic bliky ble , i can use ide , or cli commands to run it on it , it works 
but even if i try base nordic_buttonless dfu code with modification in both bootloader and it to change lf_src 0 (i don't have low freq external crystal) and accuracy and citv to match to RC config , i get the same issue

Parents
  • It seems the issue was caused by enabling the DC/DC regulator.

    Our board does not have an external low-frequency crystal (LFXO) and LC filter, which appears to be required for  DCDC operation. Once I disabled the DCDC regulator, the device started working normally, is there any way to workaround it

  • Hi,

    In order to use the DC/DC regulator, you do need external components, yes, although that has not to do with LFXO.

    In particular, you need an external LC filter. The schematics for DC/DC related components are shown in the power supply section of the nRF52811 product specification, and the full nRF52811 reference circuitry comes in two variants; one for internal LDO and one for DC/DC.

    We provide this choice, so that you can choose to either only use the internal LDO (and save components on your board) or also use DC/DC (with the corresponding addition to bill of materials for the board, but typically with lower power consumption).

    Regarding LFXO, the crystal oscillator is one of three clock sources supported for the LFCLK clock controller. However those clock sources are not related to DC/DC. Similar as with DC/DC, the available LF clock functionality relies on external components, so it is important there as well to configure in line with what components you do have on your board. For clock source you basically have a tradeoff between board components, clock accuracy and power consumption, and the choice is yours what to put on the board and what settings to configure.

    Regards,
    Terje

Reply
  • Hi,

    In order to use the DC/DC regulator, you do need external components, yes, although that has not to do with LFXO.

    In particular, you need an external LC filter. The schematics for DC/DC related components are shown in the power supply section of the nRF52811 product specification, and the full nRF52811 reference circuitry comes in two variants; one for internal LDO and one for DC/DC.

    We provide this choice, so that you can choose to either only use the internal LDO (and save components on your board) or also use DC/DC (with the corresponding addition to bill of materials for the board, but typically with lower power consumption).

    Regarding LFXO, the crystal oscillator is one of three clock sources supported for the LFCLK clock controller. However those clock sources are not related to DC/DC. Similar as with DC/DC, the available LF clock functionality relies on external components, so it is important there as well to configure in line with what components you do have on your board. For clock source you basically have a tradeoff between board components, clock accuracy and power consumption, and the choice is yours what to put on the board and what settings to configure.

    Regards,
    Terje

Children
No Data
Related