This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Programming BLE nrf51822AA beacon

Dear Nordic family,

I am using Bluetooth Low Energy, Beacon module with ARM Core from Tindie (Product link). The reference manual from their website is attached IMM-NRF51822_RefMan.pdf

I can erase the chip, programmed it with softdevice (S110) using Seggar J-Link. Using the NRF toolbox's DFU, I could connect to the device (which was named DFU TARG). Then I loaded load the softdevice dfu_test_softdevice_b.zip file from the below directory (as directed by Øyvind Karlsen)

..\Nordic\nRF51_SDK_8.0.0_5fc2c3a\examples\dfu\ble_dfu_send_hex\test_images_update

After that I tried the example hrm project's zip file (dfu_test_app_hrm) using the DFU of nRF toolbox. It got loaded successfully and the device got disconnected.

Now the device is neither visible in DFU(as expected) nor in HRM section of NRF toolbox app (I was expecting it to show up there) !!

Am I on the right track? Is this the way to program the device?

(PS: I am using Keil and sometimes J-link for compilation and programming)

:)

  • Hi. According to the datasheet your module is missing an external low frequency 32kHz crystal (see page 4). This crystal is optional, but you will have to configure your example to use the internal RC oscillator instead. An LF clock is required to provide accurate timing necessary to drive the BLE protocol. By default, in e.g. the regular ble_app_hrs example, the LF clock is configured this way:

    SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, NULL);
    

    and you should write e.g.:

    SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_RC_250_PPM_4000MS_CALIBRATION, NULL);
    

    instead.

    I'm not a 100% sure about this, but I believe all the DFU examples assumes you have an external LF crystal and that is why it doesn't work. Try to experiment with the non-DFU examples and see if you can get it working. Afterall, DFU can be quite complicated stuff.

    Relevant post.

  • Thanks Martin Børs-Lind

    I replaced the line SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_RC_250_PPM_8000MS_CALIBRATION, NULL); with SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_RC_250_PPM_4000MS_CALIBRATION, NULL);

    Still it is not getting detected!!

  • Have you tried a simple blinky example without softdevice?

    Have you tried a regular BLE example with softdevice, but without DFU, like e.g. the ble_app_hrs example? Here is a nice tutorial: Setting up an example project on the nRF51 DK.

Related