Seeed XIAO nRF52840 BLE does not work at all

First of all, there’s a bug in the latest BSP 1.1.4: Compilation error for BareMinimum example - #2 by kla and I am working with 1.1.1.

Well, as a matter of fact, I cannot even tell “work” with it because nothing works.

I have tried this example from the official page:

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  digitalWrite(LED_BUILTIN, HIGH);   
}

Here’s what I did:

  1. Plug brand-new board the PC.
  2. Upload the above code.
  3. Upload done

Then, two problems occur:

  1. the device disappears from COM port list
  2. the example code actually does not work, that is, no LED on board lit up.

I have tried double pressing reset button to enter bootloader mode then the board shows up in COM port list again, but it disappears again after upload done and still no LED turned on.

Here’s verbose log for uploading:

Sketch uses 20236 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.
Performing 1200-bps touch reset on serial port COM18
Waiting for upload port...
No upload port found, using COM18 as fallback
"C:\Users\user\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.1/tools/adafruit-nrfutil/win32/adafruit-nrfutil.exe" --verbose dfu serial -pkg "C:\Users\user\AppData\Local\Temp\arduino\sketches\9FA811DFC375886A4A8BDE9B49B9C992/sketch_sep16a.ino.zip" -p COM18 -b 115200 --singlebank
Upgrading target on COM18 with DFU package C:\Users\user\AppData\Local\Temp\arduino\sketches\9FA811DFC375886A4A8BDE9B49B9C992\sketch_sep16a.ino.zip. Flow control is disabled, Single bank, Touch disabled
Opened serial port COM18
Starting DFU upgrade of type 4, SoftDevice size: 0, bootloader size: 0, application size: 20244
Sending DFU start packet
Sending DFU init packet
Sending firmware file
########################################
Activating new firmware

DFU upgrade took 1.6852688789367676s
Device programmed.

A weird thing is, as you can see from the log, the uploader complains it cannot find upload port even though it actually upload with the port eventually:

Performing 1200-bps touch reset on serial port COM18
Waiting for upload port...
No upload port found, using COM18 as fallback

For instance, here, the uploader waits for COM18 which is right port recognized in my PC but it says no upload port found and fallbacks to COM18 which is the same port and upload success.

Anyway, I am frustrated.
I’ve bought two boards and repeated all the process twice but both of them do not work at all.

Any help would be appreciated. Thank you.

Does the IDE also switch boards? I have found that I constantly have to reselect the correct board as well as the correct port. Very frustrating. Double reset usually works for me eventually but I have to do that a few times in a row occasionally. Maybe try mbed-enabled 2.9.2 if you haven’t already. Hope you can get it sorted.

Hi there,
Sounds like a windows driver or port issue. I’m sure you tried from a fresh reboot. too?
Have you tried another PC or USB port? It’s not unusual for the boards port to change when in boot loader mode or the double fast press of the reset button. You know it’s a bug in the Arduino IDE device selection , so you MUST select the board and port each time. Once you get some successful uploads, it seems to work without intervention.
Does windows announce the USB device correctly? when it’s first plugged in?
also be sure the cable is not just a USB power cable.
my .02
HTH
GL :slight_smile: PJ

1 Like

To turn on the red LED,
digitalWrite(LED_BUILTIN, LOW);

1 Like

Sounds like a windows driver or port issue. I’m sure you tried from a fresh reboot. too?

Well, I don’t think anyone would reboot his/her PC to use a USB device nowadays, but anyway, rebooting my PC didn’t help.

It’s not unusual for the boards port to change when in boot loader mode or the double fast press of the reset button. You know it’s a bug in the Arduino IDE device selection , so you MUST select the board and port each time. Once you get some successful uploads, it seems to work without intervention.

As you can see from the log, I have chosen right port and the upload done successfully with weird message.

Does windows announce the USB device correctly? when it’s first plugged in?

I guess you mean the very first time from the box, right? And yes, as I already said, it was properly recognized at first time.

also be sure the cable is not just a USB power cable.

If it were a power cable, even the bootloader mode didn’t work.

Thank you for various suggestions.

The example code is taken from the official wiki page :sigh:…
so the writer have never tested the example code then.
But even with blink example of Arduino which alternates HIGH and LOW, it didn’t work, so I don’t think it is the software’s problem.

why would LOW turn led on , its should be HIGH right logically. unless everything in XIAO is inverse lol

The following link will answer your questions.
The LED is lit when the port is set to LOW.
Getting Started | Seeed Studio Wiki

Resources
[PDF] Seeed Studio XIAO nRF52840 Schematic

I don’t know what happened but it seems working now. I have installed various version of BSP and also tried mbed variant. Maybe some dependency were not properly installed. Anyway, it works now.