Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

BL652 EVK Crystal Problem

Hello,

      I am working with the BL652 EVK from LAIRD. The EVK has nRF52832 IC inside of the module. I downloaded the "nRF5_SDK_15.0.0_a53641a" and trying to use "ble_app_uart_pca10040_s132” application. This application is for nRF52832 with external crystal. The EVK that I use does not have an external crystal. I modified the code like below. However, I can not successfully run the code in the MCU. What could be the problem ? Can anyone help ?

nrf_clock_lf_cfg_t const clock_lf_cfg =

    {

        .source       = 0,

        .rc_ctiv      = 16,

        .rc_temp_ctiv = 2,

        .accuracy     = NRF_SDH_CLOCK_LF_ACCURACY

    };

  • Hi,

    The ble_app_uart example from the SDK calls the nrf_sdh_enable_request library function to enable the SoftDevice. This function gets the clock configuration from the sdk_config.h file. Have you tried changing the configuration of the clock directly in the sdk_config.h file ? A cleaner way, if you don't want to modify SDK files directly would be to add a app_config.h in the project and add the USE_APP_CONFIG preprocessor symbol in the compiler options. You then just re-define the options you want in the app_config.h file (in your case NRF_SDH_CLOCK_LF_SRC, NRF_SDH_CLOCK_LF_RC_CTIV, NRF_SDH_CLOCK_LF_RC_TEMP_CTIV and NRF_SDH_CLOCK_LF_ACCURACY). You must set the accuracy to 250ppm (or even 500ppm, according to nRF52832 errata #146) to get a stable BLE connection with the internal RC.


    Another thing that you might want to check is the mapping of all I/O used by the ble_app_uart example on your board. I think the UART pins mapping is the same between the nRF52 DK and the BL652 EVK but I'm not so sure about the buttons and LEDs.

  • Hello,

         I have changed the accuracy to 250ppm and even 500ppm, but nothing has changes. still I can not debug the code.

    nrf_clock_lf_cfg_t const clock_lf_cfg =
    {
    .source = 0,
    .rc_ctiv = 16,
    .rc_temp_ctiv = 2,
    .accuracy = 1
    };

  • Alright, it doesn't look like a clock configuration problem then, I am using the same configuration on a BL652 right now and it's working fine (it's on a custom PCB though, not on the evaluation kit).

    I was going to suggest to make sure the SoftDevice is flashed along with the application but looking at your screenshot I think it's the case.

    I suggest that you check how the buttons and LEDs pins are mapped on your Evaluation board (SIO_13 to SIO_20 of the BL652) and make sure nothing will go wrong if the application tries to access them maybe.

  • Hello, picben.

            LED blinking is not the case since the flashed code is crashes somewhere. If there is another problem, then Why I can not debug the code, step by step?

           I think that I have the crystal configuration problem.

           Are you using the same SDK and application with me?

            I downloaded the "nRF5_SDK_15.0.0_a53641a" and trying to use "ble_app_uart_pca10040_s132” application.

          In addition to all, I am using segger embedded studio

    Best Regards

  • Are you not able to set a breakpoint in top of main? You should be able to debug the code even with the wrong LF clock settings. The LF clock is not started until softdevice init.

    Maybe you can post your hex file here. Then I can try to debug it and see if it hardfaults.

Related