mcci-catena / Catena-Arduino-Platform

Arduino platform library for MCCI Catena IoT Systems
MIT License
12 stars 11 forks source link

How to use Fram On Catena 4612 #302

Closed mhmayyan closed 2 years ago

mhmayyan commented 3 years ago

I am trying to save data into Fram. I used code from the example catena4460_bsec_ulp.

#define BSEC_MAX_STATE_BLOB_SIZE 139

uint8_t bsecState[BSEC_MAX_STATE_BLOB_SIZE] = {0};

gCatena.getFram()->saveField(cFramStorage::kBme680Cal, bsecState);

But I get the following error

saveField: can't save uKey(0x10) 139 bytes
cFram::Cursor::put: can't put to unlocated cursor: uSize(0xa) uKey(0x13) uVer(0) offset(0xffffffff)

Catena 4612 Arduino IDE 1.8.13 Catena Arduino Platform 0.21.0

Is there any way that I can use to store application data on the onboard Fram without missing its critical data?