Xiao Sense nRF52840 - Unable to consistenly upload on Mac OS and non-mbed core

I have 2 Xiao Sense nRF52840 Boards, neither of which will consistently accept Arduino sketches. The sketches will compile, but mostly the sketches will not upload, and serial communication with the Xiao Sense is lost.The following error appears:

Port monitor error: command 'open' failed: no such file or directory. Could not connect to /dev/cu.usbmodem141301 serial port.

Before uploading the sketches the Xiao Sense shows that it is connected on the port. Recovery can be accomplished by double pressing the RESET button, and the Xiao Sense then reappears connected to the computer.

What I don’t understand is without having changed the sketches, they sometimes upload perfectly and there is no issue. An example is the 'Blink.ino" with additional code to start Serial connection and just print “Hello World” to show the communication is working. Sometimes it works, sometimes it doesn’t.

Obviously something must have changed, but I can’t determine what it is

On the other hand, I have no issues with the mbed core. Unfortunately I need to use Bluefruit which is why I’m using the non-mbed core

Update: I’m very confused at this time. I have decided to use Arduino 1.8.16 instead of the newer 2.3.2 version (again)

For whatever reason, I am now consistently being able to uploaded code and maintain a Serial connection. I don’t understand because I initially had the problems with this version which caused me to update the Arduino IDE, but since that didn’t work I reverted. I don’t think this grace period will last so I’m still looking for any solutions

Any ideas?

try lowering the baud rate … use like 19200 or slower
in your sketches

Hi there,
Lower speed may help as CGW suggest , but also try just setting it to bootloader mode, jump over to the Uf2 file thread and grab the Test :point_right: RGB LED on XIAO Uf2. file UnZip it, the RGB Blink.Uf2 file and (drag and drop) it to the Xiao open in BL mode.
After it resets the chip and you see the LED changing colors.
Try you code again, don’t touch the Xiao.
set the com port and select the board, even if it says it’s connected and the board name is correct. SELECT it anyway.
try the upload,
HTH
GL :slight_smile: PJ :v: