I have
AvrCo Pascal code for
MCP7940 RTC (only 64 bytes of battery or supercap backed SRAM via I2C), and for
AT45DG161 and similar (from 1 up to 32Mbit via SPI).
FRAM driver exists in
AvrCo so I didn't bother to write my own, but some others did so you can take a look here:
https://forum.e-lab.de/topic.php?t=3258&page=fst_unread&highlight=fram
AvrCo Pascal is not
FPC, but close enough to be more useful then some
Arduino code. PM me if you need it.
RTC is easiest but needs battery, and you would have to find a model with more SRAM (like
DS3234 with 256 bytes).
AT45xxxx is cheaper and with bigger capacity, but access is through blocks, not bytes.
FRAM is the fastest, has byte access, and doesn't need battery, but is much more expensive. If building something up to tens or hundreds of pieces - I would recommend to go for
FRAM because engineering hours are high percentage of total cost and choosing more expensive component will not impact that much or can even be a time saver. But if you are building tens to hundreds thousands of pieces - you will save a lot if you avoid
FRAM because hardware is then high percentage of total cost.
EDIT: Seeing now that you need to write data every second,
AT45xxxx is out unless you design a battery backup with enough power to write cached data block only on application exit or before detected power loss shuts off your pi. Sooner or later power failure will happen during writing and your data will fail or become incomplete. So, with
RTC or
FRAM you will probably need to either use some CRC for each write (if you can tolerate bad write by checking CRC), or some kind of battery backup and power loss detection (if you can not tolerate bad write and good write must always happen).