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

Beacon example stopped on own board.

Hi All,

I am just play with nRF52 SoC.

We design small wearable device based on MDBT42V BLE module with nRF52832 chip inside. For lear we have nRF52 DK.

I work with Segger Embedded Studio. S132 BLE core

I can open example Beacon project, build and programm to nRF52 DK and it works.

But same as example don't work on our HW.

In our HW no external low crystal -> I changed NRF_CLOCK_LFCLKSRC to NRF_CLOCK_LF_SRC_SYNTH. After this changes the function ble_stack_init() call success.

But not working too. As I see over debugger programm run main loop -> first call power_manage(), exit, set ON a LED -> second call power_manage() and never returned.

SoC do some work inside BLE core.

What happens?  How to I can found my issue and fix.

With my best regards, Pitman.

  • Other HW. Other Schematic. May be need more additionaly changes. I try found solution.

    I use debugger for run step by step. After Init functions programm run in loop forever. Where called two functions. One for check state, second is power_manage(). First cycle call power_manage() with exit, second cycle call power_manage but never exit from function.

  • Have you enabled monitor mode debugging? The step-by-step debugging may stop the softdevice and cause problem; I'm not well versed in that area so search for "monitor mode debugging" in this forum to get more info. Also take a look at the monitor mode debugging in the JLink reference menu (should be in your JLink folder).

  • I found what's wrong. Fix it and example now works on our board.

    What's wrong:

    When I set BOARD_CUSTOM define and edit board_custom.h for set correct defines for struct NRF_CLOCK_LFCLKSRC to NRF_CLOCK_RF_SRC_SYNTH. The function sdh_state_observer_notify() from nrf_sdh.c for determine clock source used defines from sdk_config.h. When I set correct clock source as NRF_CLOCK_RF_SRC_SYNTH inside sdk_config.h the example build and run success. I removed duplicate defines NRF_CLOCK_LFCLKSRC from board_custom.h.

Related