Programming nRF51822 using mbed LPC1114FN28?!

Hi all
First steps on mbed (great environment!)
I acquired a mbed LPC1114FN28 board including the DIP LPC1114. But my main focus is the nRF51822 chip that I have in a breakout board.
I removed the LPC1114 chip from mbed LPC1114FN28, and then I connected the SWCLK to SWCLK of the mcu and SWDIO to SWDIO of the mcu. Also I connected gnd and vcc to the mcu.
When connected to the laptop I can see mbed drive (ubuntu linux).

Using mbed site, I configured it for board redbear BLE NANO (it uses the same MCU) and wrote the following test program:

#include “mbed.h”
DigitalOut myled(P0_19);
int main()
{
while(1)
{
myled = 1;
wait(0.9);
myled = 0;
wait(0.9);
}
}

Build + drag & drop (no error)

I used a led in order to detect I/O changing but no pin (including the p0_19) is driven by the source code.

I also tried another program when selecting mbed LPC1114FN28:

#include “mbed.h”

DigitalOut myled1(LED1);
DigitalOut myled2(LED2);

int main()
{
while(1)
{
myled1 = 1;
myled2 = 1;
wait(0.9);
myled1 = 0;
myled2 = 0;
wait(0.9);
}
}

None pin is “blinking” :frowning:

(I have quite sure that the MCU remains with the original program (from manufacturer) that uses SDA and SCL pins to communicate with external device using i2c.)

So it seems that program is not burned on MCU

Main question: Can I use mbed LPC1114FN28 to program “external” M0 chips such as nRF51822?

Thanks

Imo

Hi imo_co,

The short answer is you can’t use that board to flash your nrf51822.

As to the reason: each Mbed board has specific firmware flashed to the interface chip that is tuned for the correct “target” mcu. In this case, interface chip is trying to flash the nrf51822 as if it is an lpc1114fn28, so the flashing will fail every time.

Sorry it’s not the answer you’re looking for, but hope that saves you some time going forward!

Thanks,
Brian

Thanks!

Can you suggest a (cheap) “general purpose” programmer?

Try the SWDAP. A firmware for the nrf51822 is listed on that page too.