XIAO with DS18B20 sensor

For starters, disconnect the DS18B20, and anything else you happen to have connected to your XIAO BLE board and see what happens.

Here’s what happened when I ran your code:
The Blue LED on my XIAO BLE Sense blinked at a rate of four per second.

Here’s why:

Arduino pin 12 is actually CPU GPIO pin P0.06, which is connected to the cathode of the Blue part of the RGB LED.

The code in the loop sends a 480 microsecond “DS18B20 Reset” low pulse every 250 milliseconds. There’s nothing to respond (by pulling the DQ line low after the “Reset” pulse returns high), so ds.search() fails, and the code prints “No more addresses.” each time through the loop.

Now, if you want to see some action on The XIAO BLE Sense Pin 2, change your OneWire object instantiation to something like this:

// Note that a 4.7K Pullup resistor from DQ to 3.3V is recommended
OneWire  ds(2);  // DS18B20 DQ Line to XIAO Pin 2

Now, I don’t have a Grove DS18B20 sensor, but its Wiki page indicates that you need the external 4.7K Ohm pullup to Vdd. I guess it’s just a barefoot DS18B20 device with some waterproofing and a cable.

Anyhow…
With a pullup resistor on Pin 2 and no DS18B20, I see the Reset pulse.

Regards,

Dave

Footnote: If you can continue operating after going into boot mode, there’s a good chance that your XIAO is OK. I didn’t have your reboot problem with this sketch, but I have seen some strange behavior with (Other People’s) sketches that use “unusual” GPIO pins in unintended ways.