← index #17867PR #17679
Related · high · value 4.609
QUERY · ISSUE

SEEED_XIAO_NRF52 board access to 1 MB Flash

openby domisolopened 2025-08-08updated 2025-11-30
enhancementport-nrf

Port, board and/or hardware

XIAO nRF52840 Sense

MicroPython version

MicroPython v1.26.0-preview.527.g593ae04ee on 2025-08-07; XIAO nRF52840 Sense with NRF52840
the same with 1.25.0

Reproduction

stat = os.statvfs("/flash")
(4096, 4096, 64, 59, 59, 0, 0, 0, 0, 255)
So that's 256 kB of memory.

Expected behaviour

No response

Observed behaviour

The board is 256 KB RAM,1MB Flash 2MB onboard Flash
Why does MicroPython only reports 256 kB ?
BTW how do I access both Flash + onboard Flash ? Do I need to make a manual operation in my code?
THanks

Additional Information

No, I've provided everything above.

Code of Conduct

Yes, I agree

CANDIDATE · PULL REQUEST

zephyr: Add Seeed Studio's XIAO BLE NRF52840 SENSE board.

mergedby bikeNomadopened 2025-07-14updated 2025-10-22
port-zephyrboard-definition

Summary

This PR adds Zephyr support for Seeed Studio's XIAO BLE NRF52840 SENSE board.

It also provides a good example of a richer Zephyr port than the default, adding:

  • Frozen modules (including asyncio, upysh, aioble, neopixel, and aiorepl).
  • Enough MicroPython features to support using aioble (at least for the temp_sensor.py example)
  • JSON, random, re, struct, etc.
  • Support for my Zephyr ADC code (see PR #17615)
  • Mounted LFS2 filesystem using the 2MiB flash mounted as /flash

You can build it in the usual way:

$ cd ports/zephyr
$ west build -b xiao_ble/nrf52840/sense . 

This will produce a .uf2 file in build/zephyr/zephyr.uf2 that can be copied into the XIAO-SENSE USB drive that appears when you double-click the RESET button.

Testing

I have tested this on several of these boards, with and without my ADC (#17615) and zensor.Sensor.attr_set() (#17653) PRs.

I have run the aioble temp_sensor.py example but haven't done much more with the BLE.

Trade-offs and Alternatives

The build size is as follows:

Memory region         Used Size  Region Size  %age Used
           FLASH:      428864 B       788 KB     53.15%
             RAM:      165908 B       256 KB     63.29%
        IDT_LIST:          0 GB        32 KB      0.00%

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied