Nano ble 33, can't upload

Hi everyone! Today I started testing my new nano ble 33. I started submitting some simple sketches and everything was working fine. After that, I wanted to test a circuit using an external battery. After that, I'm no longer able to upload anything to the board.

  • OS: Windows 10
  • Board: Nano BLE 33 (original)
  • Software: Initially I was using VS Code + Platform IO. After the failure, I tried the Arduino IDE

This is the log I'm getting (upload blink sketch):

Sketch uses 76396 bytes (7%) of program storage space. Maximum is 983040 bytes. Global variables use 42160 bytes (16%) of dynamic memory, leaving 219984 bytes for local variables. Maximum is 262144 bytes. Forcing reset using 1200bps open/close on port COM5 PORTS {COM1, COM5, } / {COM1, COM5, } => {} PORTS {COM1, COM5, } / {COM1, COM5, } => {} PORTS {COM1, COM5, } / {COM1, COM5, } => {} PORTS {COM1, COM5, } / {COM1, COM5, } => {} PORTS {COM1, COM5, } / {COM1, COM5, } => {} PORTS {COM1, COM5, } / {COM1, COM5, } => {} PORTS {COM1, COM5, } / {COM1, COM5, } => {} PORTS {COM1, COM5, } / {COM1, COM5, } => {} PORTS {COM1, COM5, } / {COM1, COM5, } => {} PORTS {COM1, COM5, } / {COM1, COM5, } => {} PORTS {COM1, COM5, } / {COM1, COM5, } => {} PORTS {COM1, COM5, } / {COM1, COM5, } => {} PORTS {COM1, COM5, } / {COM1, COM5, } => {} PORTS {COM1, COM5, } / {COM1, COM5, } => {} PORTS {COM1, COM5, } / {COM1, COM5, } => {} PORTS {COM1, COM5, } / {COM1, COM5, } => {} PORTS {COM1, COM5, } / {COM1, COM5, } => {} PORTS {COM1, COM5, } / {COM1, COM5, } => {} PORTS {COM1, COM5, } / {COM1, COM5, } => {} PORTS {COM1, COM5, } / {COM1, COM5, } => {} Uploading using selected port: COM5 C:\Users\Usuario\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.9.1-arduino1/bossac.exe -d --port=COM5 -U -i -e -w C:\Users\Usuario\AppData\Local\Temp\arduino_build_522100/Blink.ino.bin -R An error occurred while uploading the sketch

Nothing else. The built-in LED is blinking a pattern. 4 slow blink followed by ~7 fast blinks.

I attached a file with the circuit that I'm testing. Only Motor1 was connected. Using 1s lipo bat. The HC-SR04 wasn't connected at the time of testing either.

|500x354

Any ideas? Thanks a bunch!

I'm aware that there is a mistake in my design, I'm trying to use the 5V from the board, but that only works with USB (and soldering a bridge in the board)

A 3X long, 3X short blink pattern indicates Mbed OS has crashed. This causes the USB code that creates the CDC serial port to stop running, thus no port.

You can recover from this by putting the board in bootloader mode:

  • Press and release the reset button on your board quickly twice. You should now see the LED on the board pulsing, which means the bootloader is running. The double press causes the bootloader to run indefinitely (until the board is reset, powered off, or an upload is done), which means you don't need to get the timing of the reset just right.
  • Select the port of your board from the Tools > Port menu. The port will be different when the bootloader is running so don't assume you already have the correct port selected.
  • Sketch > Upload

The upload should now complete successfully. However, if you upload the same sketch you were running when you had the problem, it will probably just occur again. You will need to figure out what part of the sketch is crashing MbedOS. Now that you know how to recover the board from a crash, you can start working on that.

One thing that will crash Mbed OS is doing analogWrite on too many pins at the same time.


Debug information is printed on Serial1 when Mbed OS crashes. You can view the debug output by following these instructions (no guarantee it will be helpful though):

Unplug your Nano 33 BLE board from the computer or power supply.

Make the following connections between a USB to TTL serial adapter (AKA “FTDI”) and your Nano 33 BLE:

| Adapter | | Nano 33 BLE | | - | - | | ----------- | |------- | | RX | | TX1 | | ----------- | |------- | | GND | | GND |

You will also need to power the Nano 33 BLE. You can do this via the USB socket, or power it from the USB to TTL serial adapter’s VCC pin. If the serial adapter’s VCC pin is outputting 5 V, connect it to the Nano 33 BLE’s VIN pin. If the serial adapter’s VCC pin is outputting 3.3 V, connect it to the Nano 33 BLE’s 3.3 V pin.

Connect the serial adapter to your computer with a USB cable.

Select the port of the serial adapter from the Arduino IDE’s Tools > Port menu.

Tools > Serial Monitor

Set the baud rate menu at the bottom right corner of Serial Monitor to 115200.

Press and release the reset button on the Nano 33 BLE. You should now see the “MbedOS Error Info” output in the Serial Monitor output field.

pert: A 3X long, 3X short blink pattern indicates Mbed OS has crashed. This causes the USB code that creates the CDC serial port to stop running, thus no port.

You can recover from this by putting the board in bootloader mode:

  • Press and release the reset button on your board quickly twice. You should now see the LED on the board pulsing, which means the bootloader is running. The double press causes the bootloader to run indefinitely (until the board is reset, powered off, or an upload is done), which means you don't need to get the timing of the reset just right.
  • Select the port of your board from the Tools > Port menu. The port will be different when the bootloader is running so don't assume you already have the correct port selected.
  • Sketch > Upload

The upload should now complete successfully. However, if you upload the same sketch you were running when you had the problem, it will probably just occur again. You will need to figure out what part of the sketch is crashing MbedOS. Now that you know how to recover the board from a crash, you can start working on that.

One thing that will crash Mbed OS is doing analogWrite on too many pins at the same time.


Debug information is printed on Serial1 when Mbed OS crashes. You can view the debug output by following these instructions (no guarantee it will be helpful though):

Unplug your Nano 33 BLE board from the computer or power supply.

Make the following connections between a USB to TTL serial adapter (AKA “FTDI”) and your Nano 33 BLE:

| Adapter | | Nano 33 BLE | | - | - | | ----------- | |------- | | RX | | TX1 | | ----------- | |------- | | GND | | GND |

You will also need to power the Nano 33 BLE. You can do this via the USB socket, or power it from the USB to TTL serial adapter’s VCC pin. If the serial adapter’s VCC pin is outputting 5 V, connect it to the Nano 33 BLE’s VIN pin. If the serial adapter’s VCC pin is outputting 3.3 V, connect it to the Nano 33 BLE’s 3.3 V pin.

Connect the serial adapter to your computer with a USB cable.

Select the port of the serial adapter from the Arduino IDE’s Tools > Port menu.

Tools > Serial Monitor

Set the baud rate menu at the bottom right corner of Serial Monitor to 115200.

Press and release the reset button on the Nano 33 BLE. You should now see the “MbedOS Error Info” output in the Serial Monitor output field.

Thanks, @pert, that fixed the problem. Sadly I don't have an adapter. I should probably get one if this keeps happening.

I think I've found the source of the crash:

analogWrite(P1_13, 0);

Trying to do that crashes the board. Not sure what is the problem there.