Comm port problem when programming nRF52840

I’m trying to program my Xaio nRF52840 BLE and I keep running into the same problem. This occurs with two different parts and I’ve tried two different USB-C cables. I have uninstalled the Arduino IDE multiple times and reinstalled all the drivers from scratch.
When I first load the IDE and connect my nRF52840 I can request the unit info through the serial port and it gets reported correctly, so the serial connection seems to work.

This is the results of the verbose reporting during the end of compilation and upload:
Zip created at C:\Users\erikj\AppData\Local\Temp\arduino_build_617324/IMU_Capture.ino.zip
Using library Seeed_Arduino_LSM6DS3-master at version 2.0.3 in folder: C:\Users\erikj\Documents\Arduino\libraries\Seeed_Arduino_LSM6DS3-master
Using library Wire at version 1.0 in folder: C:\Users\erikj\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.0.0\libraries\Wire
Using library SPI at version 1.0 in folder: C:\Users\erikj\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.0.0\libraries\SPI
Using library Adafruit_TinyUSB_Arduino at version 1.7.0 in folder: C:\Users\erikj\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.0.0\libraries\Adafruit_TinyUSB_Arduino
“C:\Users\erikj\AppData\Local\Arduino15\packages\Seeeduino\tools\arm-none-eabi-gcc\9-2019q4/bin/arm-none-eabi-size” -A “C:\Users\erikj\AppData\Local\Temp\arduino_build_617324/IMU_Capture.ino.elf”
Sketch uses 50516 bytes (6%) of program storage space. Maximum is 811008 bytes.
Global variables use 7700 bytes (3%) of dynamic memory, leaving 229868 bytes for local variables. Maximum is 237568 bytes.
Forcing reset using 1200bps open/close on port COM5
PORTS {COM3, COM4, COM5, } / {COM3, COM4, COM5, } => {}
PORTS {COM3, COM4, COM5, } / {COM3, COM4, COM5, } => {}
PORTS {COM3, COM4, COM5, } / {COM3, COM4, COM5, } => {}
PORTS {COM3, COM4, COM5, } / {COM3, COM4, COM5, } => {}
PORTS {COM3, COM4, COM5, } / {COM3, COM4, COM5, } => {}
PORTS {COM3, COM4, COM5, } / {COM3, COM4, COM5, } => {}
PORTS {COM3, COM4, COM5, } / {COM3, COM4, COM5, } => {}
PORTS {COM3, COM4, COM5, } / {COM3, COM4, COM5, } => {}
PORTS {COM3, COM4, COM5, } / {COM3, COM4, COM5, } => {}
PORTS {COM3, COM4, COM5, } / {COM3, COM4, COM5, } => {}
PORTS {COM3, COM4, COM5, } / {COM3, COM4, COM5, } => {}
PORTS {COM3, COM4, COM5, } / {COM3, COM4, COM5, } => {}
PORTS {COM3, COM4, COM5, } / {COM3, COM4, COM5, } => {}
PORTS {COM3, COM4, COM5, } / {COM3, COM4, COM5, } => {}
PORTS {COM3, COM4, COM5, } / {COM3, COM4, COM5, } => {}
PORTS {COM3, COM4, COM5, } / {COM3, COM4, COM5, } => {}
PORTS {COM3, COM4, COM5, } / {COM3, COM4, COM5, } => {}
PORTS {COM3, COM4, COM5, } / {COM3, COM4, COM5, } => {}
PORTS {COM3, COM4, COM5, } / {COM3, COM4, COM5, } => {}
PORTS {COM3, COM4, COM5, } / {COM3, COM4, COM5, } => {}
Uploading using selected port: COM5
C:\Users\erikj\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.0.0/tools/adafruit-nrfutil/win32/adafruit-nrfutil.exe --verbose dfu serial -pkg C:\Users\erikj\AppData\Local\Temp\arduino_build_617324/IMU_Capture.ino.zip -p COM5 -b 115200 --singlebank
Upgrading target on COM5 with DFU package C:\Users\erikj\AppData\Local\Temp\arduino_build_617324\IMU_Capture.ino.zip. Flow control is disabled, Single bank, Touch disabled
Opened serial port COM5
Starting DFU upgrade of type 4, SoftDevice size: 0, bootloader size: 0, application size: 50524
Sending DFU start packet
An error occurred while uploading the sketch

Then it sits there and nothing happens. The port gets locked up and I have to reset my computer to release the port.

Hello, the problem looks like it is happening when you have copied the same two libraries with the same name in two different Arduino folders. My suggestion is to manually delete all library files from C:\Users\erikj\Documents\Arduino\libraries. Then you compile it again, and according to the error prompt the missing libraries are then added to the libraries directory again. If the libraries are included in the on-board package, you don’t need to add the libraries to the libraries directory.

I deleted the seeduino libraries from the directory and also just tried a simple example file for blinky. I get the same port busy error and a missing library error
Forcing reset using 1200bps open/close on port COM5
processing.app.debug.RunnerException
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:152)
at cc.arduino.UploaderUtils.upload(UploaderUtils.java:77)
at processing.app.SketchController.upload(SketchController.java:732)
at processing.app.SketchController.exportApplet(SketchController.java:703)
at processing.app.Editor$UploadHandler.run(Editor.java:2061)
at java.lang.Thread.run(Thread.java:748)
Caused by: processing.app.SerialException: Error touching serial port ‘COM5’.
at processing.app.Serial.touchForCDCReset(Serial.java:107)
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:136)
… 5 more
Caused by: jssc.SerialPortException: Port name - COM5; Method name - openPort(); Exception type - Port busy.
at jssc.SerialPort.openPort(SerialPort.java:164)
at processing.app.Serial.touchForCDCReset(Serial.java:101)
… 6 more
Invalid library found in C:\Users\erikj\Documents\Arduino\libraries\Seeed_Arduino_LSM6DS3-master: no headers files (.h) found in C:\Users\erikj\Documents\Arduino\libraries\Seeed_Arduino_LSM6DS3-master

I did a full deletion of all Arduino files on my computer.
Reinstalled from scratch.
Installed the core for the nRF52840.
I can get it to program by double clicking the reset button (I didn’t see this being a requirement anywhere but I gave it a shot) prior to uploading from the Arduino IDE. The unit successfully programs and is confirmed to be running the software.
However, Comm issues persist where I cannot use the serial monitor to get info or write info through the port. When I try it simply locks up the Arduino IDE and I need to use the task manager to end the task. If I try using a separate terminal program, there simply isn’t any data that seems to be transmitted or received by the nRF.

So I’m not sure what would drive the Comm port issues I’m having with these devices. The Comm port works with an ESP8266 when I program it. So this is device specific or the nRF drivers on the Arduino IDE that are causing a problem.
I’m running Windows 10 and have made sure all my drivers are up to date.

What version of Arduino do you use?

I’m using Arduino version 1.8.19. It works fine for all my other arduino compatible boards.

The double click of the reset to get it programmed seems to have fixed that issue. But the comm port communications at runtime is still a major issue. Trying to interface with the unit via comm port makes the IDE lock up and require a task manager kill to get the IDE to shut down.

I found a third nRF unit in my workbench stash. Tried it and it programmed and serial comm’s work without issue. So I guess something happened to the other two units that they are now damaged.

Thanks for the help but I’m guessing I have two junk parts and working third one.

Hello, our XIAO products have a one-year warranty. If your XIAO is damaged by non-human circumstances, you can contact our technical support email to give us feedback on your specific situation, and our technical support will assist you in solving the related problems. We apologize for the inconvenience caused to your use.