EEPROM On The Nano 33 BLE - Arduino Forum
Maybe your like
Might be a silly question... Is there any EEPROM on the Nano 33 BLE ? If so, how to use it ?
petorrr July 11, 2020, 6:10pm 2There is not, but you can use a part of the flash inside the microcontroller. I searched quite some time as well, resulting in deep diving into the underlying Mbed OS which facilitates a sort of filesystem and has the so-called KvStore. I use it to do some Config file type style settings, and seems to work quite well, at least for what I started with right now.
https://os.mbed.com/docs/mbed-os/v6.1/apis/kvstore.html Examples KvStore usage
My current code (under development);
#include <mbed.h> #include <KVStore.h> #include <kvstore_global_api.h> .... // NVMEM keys and strings static char KvBuf [40]; static char CheckValidStr[] = "55AA"; .... // ***************************************************************************** // NVMEM routines to read/write the configuration to/from non volatile memory // ***************************************************************************** static void nvmemGetConfig() { int16_t res; int16_t i; int32_t templ; size_t actualSize; res = kv_get("/kv/check_valid", KvBuf, sizeof(KvBuf), &actualSize); Serial.println (KvBuf); if (res != MBED_SUCCESS) { // Reset the nvmem storage when not yet initialized res = kv_reset("/kv/"); Serial.println("KV: Could not get check_valid"); res = kv_set("/kv/check_valid", CheckValidStr, strlen(CheckValidStr), 0); res = kv_set("/kv/cal_offset", "0", 2, 0); } else if (strcmp(KvBuf, CheckValidStr) == 0) { Serial.println("KV: store is valid"); res = kv_get("/kv/cal_offset", KvBuf, sizeof(KvBuf), &actualSize); Hx711SensorOffset = atol(KvBuf); sprintf(PrintBuf, "Hx711SensorOffset = %d", Hx711SensorOffset); Serial.println(PrintBuf); } } pjrebordao July 13, 2020, 11:37am 3As the frequency of writes that I intend for this non volatile memory is high, I will investigate the possibility to keep RAM On, when in System Off, using the RAMn.POWER control registers.
Related topics
| Topic | Replies | Views | Activity |
|---|---|---|---|
| Non volatile storage in NANO 33 BLE? Nano 33 BLE | 5 | 2577 | May 7, 2021 |
| Non volatile memory Nano 33 BLE Sense Storage | 6 | 8406 | May 6, 2021 |
| Persistent storage Nano 33 BLE | 10 | 3763 | June 26, 2022 |
| NanoBLEFlashPrefs: Library for missing EEPROM functionality on Nano 33 BLE Nano 33 BLE | 3 | 2645 | December 28, 2021 |
| NANO 33 BLE: EEPROM emulation? Nano 33 BLE | 2 | 1221 | May 7, 2021 |
Tag » Arduino Ble Eeprom
-
Non Volatile Memory Nano 33 BLE Sense - Storage - Arduino Forum
-
Library For Missing EEPROM Functionality On Nano 33 BLE
-
FlashStorage - Arduino Reference
-
Nano 33 BLE With External EEPROM - Storage - Arduino Forum
-
EEPROM Emulation On The New Nano Types - Arduino Forum
-
Persistent Storage - Nano 33 BLE - Arduino Forum
-
NanoBLEFlashPrefs - Arduino Reference
-
Help With EEPROM.h Library For Arduino Nano BLE Sense
-
Arduino Nano 33 BLE - Use Of Flash To Store Data; How To Expand A ...
-
Arduino-Nano-33-BLE-Sense-Code-Collection/ - GitHub
-
EEPROM With Arduino - Internal & External - DroneBot Workshop
-
BLE-Nano Arduino ATMEGA328 Tích Hợp CC2540 - Thegioiic
-
[Solved] Arduino Nano 33 BLE - Use Of Flash To Store Data