Fram usage, addresses and data length question

hello,

I’m quite new to particle and C language in general.

I did a project with an argon recently with some counters that send count data to a TIG stack, it worked fine.
I used the the famous PublishQueueAsyncRK library to make sure the data send doesn’t overflow the max published message per sec. and also to get some kind of buffer if the counter is disconnect from wifi.
It used so far the retain memory to keep that data.

Now i wanted to use a i2c FRAM (adafruit one for developpment purposes),but got some question about offset and size defined of the memory.
So i wondering about the offset function as explained in the library instructions :

PublishQueueAsyncFRAM publishQueue(fram, 100, 2000);

if i understand that correctly, it will use the FRAM from offset 100 up to 2000 ? is this addresses counted in bytes like for an eeprom emulation function (if it’s bytes then the max defined here would be 32768 - 100?)

As i want to reserve a small about of memory in this FRAM for some setting and variables, i could use fram.put() function but wanted to make sure it doesn’t overlap with PublishQueueAsyncFRAM data in the FRAM
So if i use the offset as defined above and fram.put(100 - “size of the data to save” , data) it should not overlap to PublishQueueAsyncFRAM data ? no

Sorry for these quite noobs questions but trying to understand how to save data and don’t mess up with addresses and data length

Thanks in advance for the help

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.