I had what may have been the same problem. I think that certain things in a Python script in CircuitPython may make the USB port appear busy. Or, sometimes I think people (accidentally or on purpose) fiddle-fart around in the CircuitPython base directory with files named code.py or main.py or main.txt or some such thing, that leaves the port busy.
Anyhow…
My suggestion, based on my experience on Windows 10 and Arduino 1.8.19:
First of all, exit the Mu editor or Thonny, or whatever you have been using for CircuitPython development. Exit the Arduino IDE. Unplug the USB cable to the XIAO RP2040.
Open the Windows Device Manager and note the Ports (COM & LPT) display. (My output is shown on the first attachment, below).
Now plug in the XIAO RP2040 and get it into to Boot mode. My RPI-RP2 shows up as (E:). There is no new COM port in the Device Manager display.
Copy your original CircuitPython .uf2 file to the RPI-RP2 disk.
You can drag-and-drop or use the copy command from a Windows Command window.
When the copy is complete, the XIAO RP2040 will reset, the Windows File Manager now shows CIRCUITPY for the designated disk, and a new USB Serial Device will show up in the Device Manager window. On my system it is COM20. (Second attachment, below.)
Now, open the Arduino IDE with a sketch for your XIAO RP2040. Under Tools->Port menu, select that port.
Just for kicks, open Arduino’s Serial Monitor window. If it says something like “Port is busy” or some such thing, skip down to the “Finally” paragraph below. Then come back here.
If Arduino can open the Serial Monitor for that port, you should be able to upload the sketch.
Now, here’s the thing: After uploading the sketch, the XIAO RP2040 will reset, and a completely different COM port will show up on the Device Manager display. On my system it’s COM58. (Third attachment, below)
If this doesn’t happen, I’m stuck. There may (or, maybe, not) be other things to try, but I can’t help by remote control.
On the other hand, if you did get this far, select the new port in Arduino. Under the Tools->Port menu, it shows up on my system with the helpful designation COM58 (Seeed XIAO RP2040). Now the Serial Monitor will show any Serial output that your sketch commands. This will be the port for all future Arduino uploads and Serial Monitor action.
Finally:
If you don’t have the original CircuitPython .uf2 file or if copying it to the device doesn’t fix things, you can create a completely new file and copy it to the device, so there is no way that remnants of the CircuitPython installation can screw the pooch.
If all of the previous suggestions didn’t help, try copying hidave.uf2 (after unzipping the final attachment below) to the RPI-RP2 disk.
It’s my version of “Hello, World!” that I generated using the Pico SDK when I was getting my feet wet with C/C++ development for RP2040 boards.
Regards,
Dave
hidave.uf2.zip (24.7 KB)