XIAO nRF52840 Com port disconnects after uploading

I am using a XIAO nRF52840 for the first time. I can upload the blink example and the LED blinks. Seems like success. However, the board designation at the top of the IDE goes from bold to not bold, and at the bottom of the IDE it says:

SEED XIAO nRF52840 on COM19 (not connected)

In Device Manager, COM19 disappears. And when I immediately try uploading the sketch again, I get this error message:

Sketch uses 21060 bytes (2%) of program storage space. Maximum is 811008 bytes.
Global variables use 3096 bytes (1%) of dynamic memory, leaving 234472 bytes for local variables. Maximum is 237568 bytes.
Waiting for upload port...
No upload port found, using COM19 as fallback
"C:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10/tools/adafruit-nrfutil/win32/adafruit-nrfutil.exe" --verbose dfu serial -pkg "C:\Users\kente\AppData\Local\arduino\sketches\7EB0D2D3F4C0649B5BA4A893DE7DA176/Blink.ino.zip" -p COM19 -b 115200 --singlebank
Upgrading target on COM19 with DFU package C:\Users\kente\AppData\Local\arduino\sketches\7EB0D2D3F4C0649B5BA4A893DE7DA176\Blink.ino.zip. Flow control is disabled, Single bank, Touch disabled

Failed to upgrade target. Error is: Serial port could not be opened on COM19. Reason: could not open port 'COM19': FileNotFoundError(2, 'The system cannot find the file specified.', None, 2)
Traceback (most recent call last):
  File "dfu\dfu_transport_serial.py", line 113, in open
  File "serial\serialwin32.py", line 33, in __init__
  File "serial\serialutil.py", line 244, in __init__
  File "serial\serialwin32.py", line 64, in open
serial.serialutil.SerialException: could not open port 'COM19': FileNotFoundError(2, 'The system cannot find the file specified.', None, 2)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "__main__.py", line 296, in serial
  File "dfu\dfu.py", line 235, in dfu_send_images
  File "dfu\dfu.py", line 157, in _dfu_send_image
  File "dfu\dfu_transport_serial.py", line 115, in open
nordicsemi.exceptions.NordicSemiException: Serial port could not be opened on COM19. Reason: could not open port 'COM19': FileNotFoundError(2, 'The system cannot find the file specified.', None, 2)

Possible causes:
- Selected Bootloader version does not match the one on Bluefruit device.
    Please upgrade the Bootloader or select correct version in Tools->Bootloader.
- Baud rate must be 115200, Flow control must be off.
- Target is not in DFU mode. Ground DFU pin and RESET and release both to enter DFU mode.

Any help is greatly appreciated.

It looks like you damaged your board. The question is how bad. Obviously, you need to reload the firmware (if possible), then, before doing the same thing again, figure out what you did that caused the problem. Maybe you loaded the wrong Blink? Use the board-specific version if one is provided. In any case, show the code in code tags and the wiring diagram if applicable.

Nothing is obvious to me. How do I reload the firmware?

The code is the simple blink sketch, and there is no wiring - it's just a bare naked board with nothing attached except the serial port connection.

/*
  Blink

  Turns an LED on for one second, then off for one second, repeatedly.

  Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
  it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to
  the correct LED pin independent of which board is used.
  If you want to know what pin the on-board LED is connected to on your Arduino
  model, check the Technical Specs of your board at:
  https://docs.arduino.cc/hardware/

  modified 8 May 2014
  by Scott Fitzgerald
  modified 2 Sep 2016
  by Arturo Guadalupi
  modified 8 Sep 2016
  by Colby Newman

  This example code is in the public domain.

  https://docs.arduino.cc/built-in-examples/basics/Blink/
*/

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_BUILTIN, HIGH);  // turn the LED on (HIGH is the voltage level)
  delay(1000);                      // wait for a second
  digitalWrite(LED_BUILTIN, LOW);   // turn the LED off by making the voltage LOW
  delay(1000);                      // wait for a second
}

My bad, I also didn't fully read the error log. Just follow the instructions at the bottom of the page, plus lines 4, 5, 6, and 8 at the top. Here is a screen capture of the instructions. That board is a bit tricky to work with. Do you absolutely need a XIAO

I don't understand this. Are you referring to lines 4, etc. of the error message?
Regarding the instructions at the bottom: How do I know what version of the bootloader is correct? How do I check/change the baud rate?
The XIAO has a reset pin, but none of the pins are labelled as RESET on the pinout diagram.

Assume I'm a newbie, since I am. Thanks.

One sentence has an OR in it. Reading is the first debug skill.

upgrade the Bootloader or select correct version

And in plain English is the direct instruction to fix this error.

Target is not in DFU mode. Ground DFU pin and RESET and release both to enter DFU mode.

Here are the lines I referred to

No upload port found, using COM19 as fallback
"C:\Users\kente\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.10/tools/adafruit-nrfutil/win32/adafruit-nrfutil.exe" --verbose dfu serial -pkg "C:\Users\kente\AppData\Local\arduino\sketches\7EB0D2D3F4C0649B5BA4A893DE7DA176/Blink.ino.zip" -p COM19 -b 115200 --singlebank
Upgrading target on COM19 with DFU package C:\Users\kente\AppData\Local\arduino\sketches\7EB0D2D3F4C0649B5BA4A893DE7DA176\Blink.ino.zip. Flow control is disabled, Single bank, Touch disabled
Failed to upgrade target. Error is: Serial port could not be opened on COM19. Reason: could not open port 'COM19': FileNotFoundError(2, 'The system cannot find the file specified.', None, 2)

If none of that works, you might be better off to get support at the SEEED site rather than the Arduino site.

Show us the Tools menu like below

Hi @kentm ,

sorry for the troubles..
did you try fast double click of reset..
from the FAQ..

good luck.. ~q

If you are a newbie, starting with the Arduino UNO and the Cookbook would be a good start. Your board is a very advanced board.

Yes, a fast double click of the (almost microscopic) reset button is required to get the sketch to upload and run (the LED starts blinking as it should). But the COM port doesn't stay connected - it disappears off the Device Manager, shows COM 19 (not connected) at the bottom of the screen, and the board name becomes not bold font.

I agree the other boards I've used (Mega, Uno, Pro Micro) give me a lot less trouble, but I really want to try to make this work also. And it's cool how small this thing is!

Agreed, I recently discovered their XIAO camera, it's the size of my thumbnail.
I really think you need to goto the SEEED site and find out what they say.

Take all the clues I highlighted over to the SEEED support web site and ask, OR maybe stick them in google first. I hope you don't have to be told that any search for a problem resolution on the internet will yield 99.999% fake or intentionally misleading (YES there are people who get their thrills doing that) results, you need to have the experience to judge what might be true information and what is not.

I read it correctly. However, I don't know how to upgrade the Bootloader, nor how to select the correct version. Under Programmer: "Bootloader DFU for Bluefruit nRF52" there is another option: "J-link for Bluefruit nRF52". Selecting either one makes no apparent difference.

I also read this correctly, but as I said, there is no DFU pin that I can see. But the RESET button alone seems to be doing something at least.

OK, @sonofcy Thanks for your help.

Have you checked your list of USB devices, after the upload the XIAO should disconnect BUT a new USB device should appear. Do you see that?

Have a look at this
https://mithundotdas.medium.com/xiao-firmware-update-uf2-e93a94fd499f