Volatile RAM. Thinking DS1307 without battery.


Author Message
bfwolf
Regular Member

Joined: 03/01/2025
Location: Germany
Posts: 51
Posted: 09:47am 23 Jan 2025      

  PhenixRising said  
It was the reason for the start of the thread. Before going for a hardware solution, I wondered if there was some sort of persistent-memory-while-power-was-applied that I was unaware of.
Pete had already done this in the past but there was no interest and so it was disabled.
Now it has been reinstated and works perfectly for my needs.

See phil99's posts from earlier.

  Quote  SAVE PERSISTENT and MM.INFO(PERSISTENT) added in b2.


The question is, whether "SAVE PERSISTENT" stores the information in "persistent storage" (EEPROM, FLASH) or not..   If it does, it may destroy the chip in time (wear out the cells). Flash doesn't have the large count of write cycles as EEPROM has. There's an other risk: Writing to FLASH/EEPROM may be interrupted by a power loss and destroy even other data (if in the same erasable page/sector).

I always try to avoid storing informations in FLASH/EEPROM, if they are likely to change frequently. If it's not necessary that the informations survive power failures, the RAM method is sufficient. Even the fact, that power failure (or reset or watchdog timeout) happened, can be obtained this way.

I just found in the RP2350's manual, that there is a (slow) 1KB "Boot RAM" at an address (0x400e0000, BOOTRAM_BASE) far away from the "regular RAM".

bfwolf