Store data in .txt or .csv on NRF52840

Hello everyone,

I would like to know since the Arduino Nano 33 BLE does not have an EEPROM if I could store somehow the data I get from different sensors in a text or an excel file so I can send them (when the memory is full) via BLE.
Is there any library that could help me access the nrf52840 flash memory because I could not find something.
Or I should use a NAND flash memory or a SD card?

Thanks in Advance!

I would advise against using the program flash memory as temporary data storage.

Storing data in program flash memory that is not changed very often is OK and may even be a good idea to offer some protection against someone reading the data (compared to an external device), using it continuously to store temporary data is not advisable. Flash for program memory is designed for fewer write accesses than EEPROM or data storage flash but longer life time. A bit error in program flash is fatal while it can be corrected in data memory. In extreme cases your device can be damaged in a short amount of time.

There are multiple alternatives. Each with pro and cons.

  • Internal RAM, the nRF52840 has a large RAM that you could use as a buffer. This is the cheapest option but when the device loses power your data is gone.

  • External FRAM or EERAM can be written very often and store data even when the power is lost. But the size is limited.

  • SD card or external data flash offer the largest amount of memory. SD card is well supported by Arduino libraries. And you can remove the card and transfer the data with a card reader.

If you still want to use the internal flash let me know. Someone posted a sketch recently; I can try to find the thread and post a link.

1 Like

Thanks for your advice.
I am working on a wearable device and I saw that SD cards have high power consumptions so I would like to avoid them.
How can I access(write/read/erase) the RAM on the nRF52840?

You can simply create a global array.

1 Like