Serial communication not work using mbed and ble nano v2


I have a problem with serial communication with mbed platform and ble nano v2.
How to define serial communication pins. The attached code does not work. Code not functioning even the blink does not work if a serial port is defined.
Plain blink without serial communication works!

How to enable communication via P0_29 and P0_30?

#include “mbed.h”

DigitalOut led1(P0_11, 1);
Serial pc(P0_29, P0_30); // tx, rx
//Serial pc(USBTX, USBRX);

// main() runs in its own thread in the OS
int main() {


while (true) {

led1 = !led1;

Resources related to the topic:


kindly follow the link “” it will solve your issue.
just need to add the in mbed_app.json
“target_overrides”: {
“NRF52_DK”: {
“target.uart_hwfc”: 0