0

I am trying to log data to the flash memory of a Seeed Xiao BLE Sense microcontroller (which uses the nRF52840 processor). The data to be stored will be binary on/off corresponding to the state of a switch at given intervals. I'd prefer to use the onboard flash instead of an SD card to minimize footprint and power consumption.

I've looked at the FS_nano33BLE library, which was created for an Arduino board using the same processor, but I'm not clear on how to implement it, or if it will even work. This library also limits the storage to 512KB, but the XIAO has 2MB onboard memory, plus 1MB on-chip memory.

Any guidance would be greatly appreciated!

Jordan
  • 1
  • 2

2 Answers2

0

For using flash memory in Seeed BLE we have modify a bit in FS_nano33BLE library.

you can find FS_Nano33BLE.h in FS_nano33BLE library folder in that you have to comment this lines

#if !( defined(ARDUINO_ARCH_NRF52840) && defined(ARDUINO_ARCH_MBED) && defined(ARDUINO_ARDUINO_NANO33BLE)&& defined() )
  #error This code is intended to run on the MBED nRF52840 platform! Please check your Tools->Board setting. 
#endif

then try to upload those example codes

Gerhard
  • 6,850
  • 8
  • 51
  • 81
0

There are two versions of the programming environments (board files) in Arduino IDE for this board. Version 1.0 is using Adafruit (RTOS) and libraries and version 2.6.1 using Arduino on top of Mbed. Cannot use both at the same time. Have to uninstall one in order to load up the other.

Here are some examples that Seeed claims can be adapted to QSPI from SD:

https://github.com/Seeed-Studio/Seeed_Arduino_FS

https://github.com/Seeed-Studio/Seeed_Arduino_SFUD

There is an example already in the Arduino IDE under named "Adafruit Internal File System on Bluefruit nrf52" => "Internal_ReadWrite" that works. It's a very simple program that allows you to name a file and some text that you want inside that file and it will write it. Then when you reboot/restart the board you can read back that text from that file.

https://github.com/adafruit/Adafruit_nRF52_Arduino/tree/master/libraries/InternalFileSytem/examples

Careful not to place any write functions inside the "main loop" or it could wear out your memory. I assume its true for QSPI also.

fe7565
  • 1
  • 1