9 years, 9 months ago.

mbed compiler for nRF51822 Bluetooth Smart Beacon Kit

We have been using nRF51822-mKIT for code development and recently received nRF51822 Bluetooth Smart Beacon Kit. There is desire to use nRF51822 Bluetooth Smart Beacon Kit for testing because of the smaller size.

When we looked at the "blinky" app on mbed, one difference between the two platforms became obvious. On nRF51822-mKIT, LED1 and LED2 are connected to GPIO P0.18 and P0.19, respectively. On the other hand, nRF51822 Bluetooth Smart Beacon Kit has a 3-color LED which is connected to GPIOs P0.12, P0.16, and P0.17.

So, right there we see incompatibility and that made us wonder if one should even try to use mbed to compile code for nRF51822 Bluetooth Smart Beacon Kit.

Question relating to:

The nRF51822-mKIT is a low cost ARM mbed enabled development board for Bluetooth® Smart designs with the nRF51822 SoC. The kit gives access to all GPIO pins via pin headers …

1 Answer

9 years, 9 months ago.

You have the option to switch to using the mbed-src library (instead of mbed) in your project; and then either remap the pin-names for LEDs by editing http://mbed.org/users/mbed_official/code/mbed-src/file/7618f037e2de/targets/hal/TARGET_NORDIC/TARGET_NRF51822/TARGET_NRF51822_MKIT/PinNames.h or create your own HAL target (alongside TARGET_NRF51822_MKIT) and contribute it back to mbed.org. :)

Note: I've used a URL to identify the PinNames.h file; but you'll be changing the corresponding file in your project.

Accepted Answer

You could even use the alternate pin names directly to initialize your DigitalOut variables like this:

DigitalOut ledRed(p12);

posted by Rohit Grover 30 Jun 2014