I am laying out a door/access controller around Gen 3 hardware that obtains a list of valid key IDs from the network and stores them in memory. As a design constraint, I assume that both network and power are unreliable (including absence of battery backup). If either the network is unavailable or the device had to reboot due to power loss (or both), the device should retain and use the “last known good ID list” to manage access until it can reach the network to verify the list.
The data retention without power would mean using EEPROM, however I couldn’t deduce whether I should:
- Use EEPROM as primary storage (all ID list CRUD operations are put() / get() to EEPROM) or
- Fetch data out of EEPROM into some RAM var/struct at reboot, saving on EEPROM/flash wear on read operations, but perform the much less frequent writes to both
Alternatively if I wanted to utilize Retained RAM and could add a battery back-up, can I do better? Maybe somehow detect the switch to Vbatt, dump the ID list to EEPROM and brace for the battery to deplete until VUSB returns?
I read through this forum for an answer as well as @rickkas7’s Retained Memory Tips (which does not mention Gen 3 explicitly), but didn’t find a direct example for my situation. I have noted from the forums there are some edge case concerns with Retained RAM on Gen 3.
PS: To stave off downtime as much as possible, I am trying to design the hardware around an Argon on an ethernet shield with the POE module, with UPS back-up at the POE power source.