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

nrf51822 BLE stack into flash memory.

Hello! I'm trying to program nrf51822 like a BLE device. I'm using QT Creator(QBS) + GNU Compiler + Open OCD + STlink(debugger) to create and to program. What I must to do if I want to create BLE device? I'm trying this:

  1. From examples I get "ble_app_template_s110_xxaa.hex" file.

  2. Tries to program flash with it via open ocd.

  3. Resets chip.

Nothing happens. I modified example(main.c file) like this (led has pin9):

...
    void func_mig()
    {
        nrf_delay_ms(500);
        nrf_gpio_pin_set(9);
        nrf_delay_ms(500);
        nrf_gpio_pin_clear(9);
        nrf_delay_ms(500);
    }

    /**@brief Function for application main entry.
     */
    int main(void)
    {
        nrf_gpio_cfg_output(9);
        func_mig();
        nrf_delay_ms(2000);
        func_mig();
        func_mig();
        // Initialize
        leds_init();
        timers_init();
    ...

But, if I programs this code with blank .ld files, I can toggle on/off with Leds.

Can you tell me step by step, how Can I make BLE device and connect to it with smartphones?

In other question cocoa told to me:

blank is used with bare nRF51 chip (it runs as a pure ARM Cortex M0), s110 used when S110 soft device (BLE stack) is programmed in flash memory.

To create a BLE device start with ble_app_template in SDK examples dir.

But How I can to program BLE stack in flash memory? And What exactly I must do after it?

Parents
  • Thanks Nguyen Hoan Hoang for your attention! I resolved this problem!

    S110, S120, S130 is a part of the SDK, and located as an archive (s110_nrf51822_7.1.0.zip, s120_nrf51822_1.0.1.zip, s130_nrf51822_0.9.0-1.alpha.zip). In this archives is hex files. This hex files is a BLE stack.

    To program with openOCD I used command program s110_nrf51822_7.1.0_softdevice.hex

    after it, I builded project from examples "ble_app_template", and program this hex file with command program ble_app_template_s110_xxaa.hex.

    This solution helped to me.

Reply
  • Thanks Nguyen Hoan Hoang for your attention! I resolved this problem!

    S110, S120, S130 is a part of the SDK, and located as an archive (s110_nrf51822_7.1.0.zip, s120_nrf51822_1.0.1.zip, s130_nrf51822_0.9.0-1.alpha.zip). In this archives is hex files. This hex files is a BLE stack.

    To program with openOCD I used command program s110_nrf51822_7.1.0_softdevice.hex

    after it, I builded project from examples "ble_app_template", and program this hex file with command program ble_app_template_s110_xxaa.hex.

    This solution helped to me.

Children
Related