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

Migration to MDBT42

Hi,

I want to migrate BLE HRS peripheral sample to custom board with Raytac's MDBT42-512KV2 (WLCSP nrf52832 used). The board doesn't have external XTAL.

In sdk_config.h I set:

#define NRF_SDH_CLOCK_LF_SRC 0
#define NRF_SDH_CLOCK_LF_RC_CTIV 16
#define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 2
#define NRF_SDH_CLOCK_LF_ACCURACY 0

to indicate missing XTAL and to use internal RC oscillator.

The program enters main loop in main.c but I never receive any event in on_adv_evt (I guess it should indicate start of advertising that is started in main function). After a while the firmware probably stops executing after some hardfault or something similar as "stack frame not in module" is indicated by GDB when I want to step through the program.

Can you please help me with migrating BLE sample project to MDBT42?

Parents
  • The program enters main loop in main.c but I never receive any event in on_adv_evt

     So you have programmed the softdevice, right?

    I would recommend that you set NRF_SDH_CLOCK_LF_ACCURACY = 1; when you use the internal RC Oscillator.

    Did you do any other changes to the project? Do you have a board header file that matches your custom board?

    If you are able to debug, can you try to define DEBUG in your preprocessor defines and set a breakpoint in the app_error handler to see whether any of the APP_ERROR_CHECK(err_code) receives an err_code != NRF_SUCCESS?

    If you have the possibility for monitoring the log (try to enable RTT logging, and watch the RTT Log using "J-Link RTT Viewer". If you have DEBUG in your preprocessor defines it should print out where the application fails.

    Best regards,

    Edvin

  • Not sure what the issue was, maybe rebuild helped. Anyway, it works now.

Reply Children
No Data
Related