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

BLE app beacon example not executing

I have nrf52dk (nrf52832) board and a custom nrf52805 board. The nrf52805 board has no external 32kHz crystals, but only 32MHz crystal. Also, it is in LDO mode (no DC-DC inductors).

I compiled "nRF5_SDK_17.0.0_9d13099\examples\ble_peripheral\ble_app_beacon\pca10040e\s112\arm5_no_packs" example in Keil without any problem. However, the code gets stuck in both nrf52805 and nrf52832, exactly at ble_stack_init() -> nrf_sdh_enable_request(). The MCU runs in loop and never passes ble_stack_init() .

Before compiling, As mentioned in https://devzone.nordicsemi.com/nordic/short-range-guides/b/getting-started/posts/developing-for-the-nrf52805-with-nrf5-sdk I completed the procedures "Patching nRF5 SDK v17.0.0 to support the nRF52805", and

(i) "Creating an emulated project for the nRF52805 on the nRF52 DK" in the above link when i program nrf52832 dev kit, and

(ii) "Transferring an emulated project to nRF52805 hardware" when i program nrf52805

Note that first i load softdevice (s112_nrf52_7.0.1_softdevice.hex) onto both the boards before i program app_beacon example. Alongside, I also tried changing

nrf_clock_lf_cfg_t const clock_lf_cfg =
    {
        .source       = NRF_SDH_CLOCK_LF_SRC,
        .rc_ctiv      = NRF_SDH_CLOCK_LF_RC_CTIV,
        .rc_temp_ctiv = NRF_SDH_CLOCK_LF_RC_TEMP_CTIV,
        .accuracy     = NRF_SDH_CLOCK_LF_ACCURACY
    };

where I set NRF_SDH_CLOCK_LF_SRC = 0 , and NRF_SDH_CLOCK_LF_ACCURACY=1,

but no luck.

I want to run ble beacon on nrf52805.

  • Hi

    The ble_app_beacon_pca10040e_s112_flash_s112_nrf52_7.0.1_softdevice.hex is not just the SoftDevice I think, but rather the nRF52810 beacon example including  the SoftDevice. Please try flashing the .hex file located in  \SDK\nRF5_SDK_17.0.0_9d13099\components\softdevice\s112\hex  before flashing the application code onto the device. 

    You will also need the internal LF clock configurations you mention when running the example on your nRF52805 HW.

    Best regards,

    Simon

  • Yes, I programmed with the softdevice (s112_nrf52_7.0.1_softdevice.hex) from nRF5_SDK_17.0.0_9d13099\components\softdevice\s112\hex before I programmed the app beacon as mentioned in my post. No use.

    I have set LF clock to RC as I do not have external 32khz crystals.

  • Hi

    In the attached folder, I have uploaded a folder containing a modified version of the nRF5_SDK v17.0.0 with an example of the pca10040e project modified to work as an emulated nRF52805 project tested to work on the nRF52832 DK. I don't have nRF52805 HW to test this on at the moment, but it should be able to transfer an emulated project to nRF52805 as well if you follow the instructions.

    nRF5_SDK_17.0.0_9d13099.zip

    Best regards,

    Simon

  • Thank you for the updated SDK Simon. It works fine on both the NRF52DK and nrf52805 chip (steps under "Transferring an emulated project to nRF52805 hardware" need to be performed".

    What was the issue in the previous SDK?

  • Hi

    I'm glad you got it working now! The SDK I uploaded is just a version of the original SDK v17.0.0 where I followed the Patching nRF5 SDK v17.0.0 to support the nRF52805 and Creating an emulated project for the nRF52805 on the nRF52 DK sections in my colleague Bjørn's guide. I assume that you missed a step in your effort to patch the SDK, so I did it here on my side to make sure the guide was working. No issue in the SDK. If you are satisfied with the reply, please verify the answer you found helpful in order to help forum users in the future having the same problem.

    Best regards,

    Simon

Related