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

How to program RedBear BLE nano (MDBT40, which integrate nrf51822) using Nordic SDK 12 (S130)

Hello Folks,

I am currently try to program RedBear BLE nano board (which is essentially nrf51822) using Nordic SDK v12, which has features of secure OTA. However after trying out for few days, it doesn't work as expect for a simple blinking examples. It would be appreciated if any one can indicate some tutorial on it. The system I used is Ubuntu 16.04.

  • currently the source file can be successfully compiled whose output files are in /examples/peripheral/blinky/pca10028/s130/armgcc/_build/nrf51422_xxac.hex

currently I assume that nrf51422_xxac.hex can be used as application .hex file for nrf51822.. I don't know how to build output of nrf51822_xxac.hex. And also where can I find the boot loader or build application code??;

  • Then I tried to merge this file with SoftDevice by using mergehex: ./mergehex -m s130_nrf51_2.0.1_softdevice.hex nrf51422_xxac.hex -o out.hex

  • Finally, I drag out.hex to virtual file system, created by DAPLink.

For ease of demonstration, I modified the blinking program as below, which pin 39 is P0.19, which corresponding to RedBear on board LED (the number is given by MDBT40).

 /* Configure board. */
bsp_board_leds_init();

nrf_gpio_cfg_output(39);
nrf_gpio_pin_set(39);

/* Toggle LEDs. */
while (true)
{
     nrf_gpio_pin_set(39);
     nrf_delay_ms(500);
     nrf_gpio_pin_clear(39);
     nrf_delay_ms(500);
}

For convenience, you may refer to RedBear pin map here: http://redbearlab.com/blenano/

Please let me know if you have any clue on making this simple blinking example work. Thanks!

Parents
  • You don't need a bootloader. The bootloader is only required if you need to do an Over The Air (OTA) update, or possibly update via serial

    I've not used DAPLink, but I think a lot of people use that and it works fine.

    BTW. I didnt notice before but pin p0.19 is just 19 not 39

    Can you try that

    If thats no good..

    Have you tried flashing some of the pre-made hex files, I think the PCA10028 hex files, with or without SD should work

    But you may not have the LED on the same pins as that board (PC10028)

    You can try flashing the PCA10028 becaon example as that may work

Reply
  • You don't need a bootloader. The bootloader is only required if you need to do an Over The Air (OTA) update, or possibly update via serial

    I've not used DAPLink, but I think a lot of people use that and it works fine.

    BTW. I didnt notice before but pin p0.19 is just 19 not 39

    Can you try that

    If thats no good..

    Have you tried flashing some of the pre-made hex files, I think the PCA10028 hex files, with or without SD should work

    But you may not have the LED on the same pins as that board (PC10028)

    You can try flashing the PCA10028 becaon example as that may work

Children
No Data
Related