XIAO BLE Sense in deep sleep mode

Good morning,

Is there a way to put the XIAO BLE Sense into a deep sleep mode ? I didn’t find any informations about that functionality.
I tried to use ArduinoLowPower library that should work on NRF52 chip but without success.

Any clues… ?

bootloader firmware address:BLE_52840_Core/Seeed_XIAO_nRF52840_Sense_bootloader-0.6.1_s140_7.3.0.hex at main · 0hotpotman0/BLE_52840_Core · GitHub
demo:BLE_52840_Core/deep_Sleep.ino at main · 0hotpotman0/BLE_52840_Core · GitHub

We are still planning to write the wiki on how to use it. If you are in a hurry, you can study how to use it yourself.

Hi Citric,
I am trying to replicate the sleep mode as written in the wiki, but when I want to compile the deep_Sleep.ino I get this error: SdFat.h: No such file or directory
I am using Arduino 1.18 and have installed all libs mentioned in the wiki,
Any help or suggestion, please?

The firmware we provide is flashed into the XIAO BLE and no separate code is provided.

Dear Citric,
Thanks for the reply, However On the wiki page says:

Power Consumption Verification¶
The XIAO BLE is low power consumption and here we provide a method to verify.
Step 1. Use JLink Downloader to flash the bootloader firmware for XIAO BLE (Sense).
Step 2. Upload the deep_sleep demo here and run it with Arduino

Right ? so what is the “deep_Sleep.ino” code for? It says after flashing the firmware, one has to run that demo code, right?

So it raises several questions,

  1. I do not have Jlink downloader and I am NOT planning to spend several $500 to buy one!.
    But I realised when I push the reset twice quickly, it goes to bootloader mode and I have a drive named “XIAO-SENSE” (I attached the screen)
    Can I just copy-paste the low-power bootloader rather than flashing with Jlink ?
    I see there is a uf2 bootloader version at update-Seeed_XIAO_nRF52840_Sense_bootloader-0.6.1_nosd.uf2
    BLE_52840_Core/bootloader/Seeed_XIAO_nRF52840_Sense at main · 0hotpotman0/BLE_52840_Core · GitHub

  2. what are the limitations of this low-power bootloader compared to the one that is already burned on the board that we have bought?

  3. Assuming, I did reflash the firmware you mentioned; so I have to run the demo code “deep_Sleep.ino”, right? When I try to run and upload the demo code, Arduino IDE gives this error :

error: SdFat.h: No such file or directory

what is the issue and how I should fix it? there is none of the libraries ( Adafruit_SPIFlash.h & bluefruit.h & SdFat.h) used in that demo code in the directory I have installed (I have followed the wiki ) …\packages\Seeeduino\hardware\nrf52\2.6.1\libraries
I have also attached the screenshot of my Arduino in the previous comments.

  1. I have followed the wiki to add XIAO ble sense to Arduino, I can compile and run the example codes on the wiki but the …\packages\Seeeduino\hardware\nrf52\2.6.1\libraries is different than the GitHub code you have mentioned, what is wrong? any idea? Wiki and Arduino installation have discrepancies!

I appreciate your detailed answers.

Hi, I reconfirmed with R&D, we don’t need to download BootLoader to BLE by ourselves, you can modify deep_Sleep.ino to achieve ultra-low power operation. The purpose of this code is to show the lowest power consumption when the XIAO BLE is booted.
As for the error about SdFat, you can fix it by searching for and downloading the SDFat library in the library manager.
It may be normal for local code to differ from GitHub. There are two solutions, the first is to try uninstalling the original onboard file and downloading it again. The second is that you can just use the latest code from GitHub, which I think may also be due to R&D not being updated in time.

I can add SdFat but what about the “bluefruit.h” ?? It belongs to “Adafruit_nRF52_Arduino” core, it is not possible to install it from the library manager! I downloaded it from GitHub and tried to install it, but still, I got tons of errors. It seems these so-called demo code can not be compiled, I am wondering if you have run them!! The mentioned libraries are not compatible with XIAO ble!! and documentation is pretty scattered and low.

It seems there are many discrepancies in the Arduino based development support provided e.g. I see there are two nrf52 cores that have been referred to in the wiki and here at the forum. one Adafruit based and the other Arduino based.

However, as a matter of fact, using the deep sleep for nrf52 boards is an essential thing and the lack of it actually makes the XIAO NRF52 boards useless! I hope seeed’s R&D team understand the priority of this matter and provides some fix asap.
I really started to feel regret buying this board, not money wise but also time wasted on this nice hardware and finding out that there is no minimum software support for it.


Thank you for your feedback, I will arrange to retest as soon as possible and get back to you.

Please share more detail about how to use deep sleep mode in xiao ble sense mode.


I agree with Dr Blueble.
I bought this board with the allure of 5µA sleep but cannot get the example from the wiki to work either. Without that sleep, I am measuring closer to 8mA.

Ok, I was able to build the deep_sleep.ino demo without errors.
The issue is that there are 2 versions of the board (as configuration) and the demo builds only with version 1.0.0

That said, I am measuring up to the order of 60mA with this board with 1.0.0.

Which version of the board are you using (sense vs regular)?
And how are you powering the board to test it? Battery pins or 3V one?

Agree with @Dr_Blueble, while the hardware is nice, the documentation is really lacking and it makes it quite hard to do something useful with the board.

Good for you,
BTW, would you care to elaborate on how you did and what you mean by version 1.0.0, hardware or board manager package? also, what is the current consumption you observed in sleep mode?

1 Like

It has been confirmed that our engineers configured certain environments when using XIAO BLE low-power mode, but they carelessly forgot to tell everyone how to operate these environments completely through the wiki. They are currently optimizing the code to reduce the threshold for everyone to use, and they expect to be able to rework it for normal use in early May.

If you are in a hurry, you can try to roll back the XIAO BLE on-board package to version 1.0.0 in the development board manager first, which will also work.

Hi Citric,
Thanks for conveying the matters to Seeed’s engineers.
And yes we have time restrictions and need to decide soon, we were planning to buy a large amount of senseBLE to use SenseBLE for a project. But with the current lack of support, we might move to other vendors! (even though I like senseBLE form factor)
I have tested with version 1.0.0, now the sleep_demo compiles but the current does not go down, from battery pins at 4.1V, I measure current around 3-6mA after SenseBLE was supposed to be in sleep mode. (expected 3uA in deep-sleep mode )

1 Like

Hi together,
We are also failing to get into deep sleep. Would be nice get some improvements soon, otherwise it’s quite difficult to use XIAO BLE Sense for wearable projects.

1 Like

Have you tried flashing the bootloader?
The fact that flashing the bootloader is mentioned everywhere and the latest version is from November and the commit mentions upgrading the SoftDevice version, I am becoming suspicious that’s a necessary step. There is a UF2 file as well which should make the upgrade less convoluted.

1 Like