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.

Parents
  • Can you confirm that you are changing to NRF_CLOCK_LF_SRC_SYNTH in NRF_SDH_CLOCK_LF_SRC?

    That is:

    #define NRF_SDH_CLOCK_LF_SRC 2

    If that is not the problem, can you try to use the RC oscillator and see whether that works (only for debugging)?

    #define NRF_SDH_CLOCK_LF_SRC 0

  • 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.

Reply
  • 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.

Children
No Data
Related