Why am I getting such error for XIAO nRF52840 Sense?

Arduino gives this error for XIAO nrf52840 Sense. I programmed it a few days ago with no problems, but now I keep getting port-related errors. How can I fix it?

Sketch uses 21212 bytes (2%) of program storage space. The maximum is 811008 bytes.
Global variables use 3096 bytes (1%) of dynamic memory, leaving 234472 bytes for local variables. The maximum is 237568 bytes.
Forcing reset using 1200bps open/close on port COM24
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 ‘COM24’.
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 - COM24; Method name - openPort(); Exception type - Port busy.
at jssc.SerialPort.openPort(SerialPort.java:164)
at processing.app.Serial.touchForCDCReset(Serial.java:101)
… 6 more

Hi,
Have you tried to restart the board using the reset key? If that doesn’t work, you can try two quick clicks to get into boot loader mode

Hello AndrewBrook,
So having programmed many pieces, and No specific code posted. I would offer this. Try first to connect to another Win10 or 11 computer/Laptop. Second if windows doesn’t recognise it initially , moving forward is usually a dead end.
ALWAYS select the Board and Port no matter what it say’s. (IDE) mbed vs. non-mbed.
Have a Basic Sketch ready to test with that loads on Others without issue.
Have more than one way to Read/program a device , IDE or Nrf Connect for DeskTop with the programmer.

I would start there. My .02 YMMV
HTH
GL :slight_smile: PJ