Recently I have been working to make Atmega1280 work with ferroelectric non-volatile RAM FM1608(datasheet). Ferroelectric and non-volatile means that this thing is basically bulletproof (by bullets I mean radiation) and remembers everything even after power outage (like flash). Why would I do this? The reason is simple, I will use this to store avr's firmware, so even if flash memory gets corrupted the bootloader can restore the firmware from the ferroelectric memory. It makes the chip stand much more radiation, like in a nuclear reactor or on the Moon.

Atmega1280 has External Memory Interface so I connecting the RAM and atmega (in Arduino MEGA) with a simple latch. After a week of debugging it came out that atmega and RAM speak different control signals. Small point to point AND gate, made out of diodes, fixed that problem. So it finally worked. Amazing how parallel communication can work at 16MHz through that awful mess of wires.

Next was the firmware. The pleasure, I got to write C code twith lots of pointers and static memory mapping. Basically it takes the contents of the flash via UART in 128 byte packets (half of code page) and saves it to ram. It would have been logical to send and save code in full pages (like the bootloader uses it), but the application required the packets to be smaller than 256byte. The code uses Fletcher's checksum to make sure there were no errors in transmission.

2 thoughts on “Ferroelectric RAM with AVR”

Very interesting Jaanus, I haven't found any other posts about DIY electronics in space. I have a question: Where is the bootloader located? Normally it's in the Flash itself, so it would get corrupted as well by radiation. How do you go about this?