Can't upload to BLE Sense

Windows 7, Arduino IDE 1.8.13, Arduino Nano BLE Sense. Device Manager was showing ArduinoBLESense on COM12, working properly. IDE was showing ArduinoBLESense on COM12. Get Board Info was returning board info. Clicking Upload button sketch compiled successfully (example from BLE Sense library), then IDE reported "No device found on COM12"

Followed procedure in post "Loop-Back Test Instructions." On plugging board into USB port, green power led didn't light up.

Disconnected board, removed jumpers, reconnected board.

Windows then reported "USB Device Not Recognized." Device Manager not showing ArduinoBLESense, IDE not showing ArduinoBLESense, not getting board info.

Rebooted PC - no change.

Shut PC down, brought it back up.

Now back to square 1.

What to do?

The tricky thing about the boards with native USB functionality like your board is that the USB code that creates the CDC serial port is running on the same microcontroller as your sketch. This means your sketch code can break the USB code, or stop it from running, resulting in no port.

Fortunately, there is an easy way to recover from this situation:

  • 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 number may be different when the bootloader is running so don't assume you already have the correct port selected.
  • Start an upload in the Arduino IDE.

The upload should now finish successfully. After this, you should be able to go back to doing normal uploads without needing to press the reset button. If you still need to do the reset trick to do uploads after this, the problem may be caused by your code. You can verify this by uploading a simple sketch like File > Examples > 01.Basics > BareMinimum.

Thanks! Sketches (BareMinimum, Blink, Nano33BLESensorExample_pressure) now uploading just fine.

You're welcome. I'm glad if I was able to be of assistance.

I hope you will have success in determining what was the cause of the crash. If you get stuck, you can post the sketch that demonstrates the problem (ideally as minimal a sketch as possible while still getting the crash) and we'll try to help you with the troubleshooting.

Regards, Per