![]() |
Forum Index : Microcontroller and PC projects : Volatile RAM. Thinking DS1307 without battery.
![]() ![]() |
|||||
Author | Message | ||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4528 |
There is a diode between Vbus and Vsys on the genuine pico board. Volhout PicomiteVGA PETSCII ROBOTS |
||||
bfwolf Newbie ![]() Joined: 03/01/2025 Location: GermanyPosts: 26 |
The question is, whether "SAVE PERSISTENT" stores the information in "persistent storage" (EEPROM, FLASH) or not.. ![]() 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 |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 9512 |
uint64_t __uninitialized_ram(_persistent); |
||||
bfwolf Newbie ![]() Joined: 03/01/2025 Location: GermanyPosts: 26 |
uint64_t __uninitialized_ram(_persistent); ![]() ![]() But I found this issue while googled for "pico __uninitialized_ram" (as nosy as I am).. ![]() https://github.com/raspberrypi/pico-sdk/issues/2203 Issue "opened" by you, peter, true? bfwolf |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4528 |
For modern NAND flah (and eMMC/SD cards) there are 2 things that ar bad 1/ frequent writing to it (wear out) 2/ long time power off This type flash looses content pretty fast, and as long as the data is refreshed/re-written that is not a problem. But leaving a modern SD card without power for years, will make the card useless. The higher the temperature, the worse it gets. So this is not the type of storage for your family photo's. Better use an old harddisk. SSD's are the same type of memory and will exhibit the same phenonem. I learned this yesterday from the vendor. Volhout PicomiteVGA PETSCII ROBOTS |
||||
PhenixRising Guru ![]() Joined: 07/11/2023 Location: United KingdomPosts: 1024 |
@Volhout: Good info ![]() |
||||
Frank N. Furter Guru ![]() Joined: 28/05/2012 Location: GermanyPosts: 902 |
Please don't forget to put a diode in front of the capacitor from Volhout's idea. Then the capacitor cannot be discharged externally. This is how I have implemented it in the past and it has always worked well... Frank There is a diode between Vbus and Vsys on the genuine pico board. Volhout Yes, but if there are other loads BEFORE the capacitor, they can drain the capacitor without an additional diode. Frank |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 3907 |
1/ frequent writing to it (wear out) 2/ long time power off This type flash looses content pretty fast, and as long as the data is refreshed/re-written that is not a problem. But leaving a modern SD card without power for years, will make the card useless. Volhout Useless (i.e. no longer works) or just content gone? John |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4528 |
John, I was told that the eMMC controller (when powered) swipes the memory for errors, and when there are, it relocates and corrects (the error correction can correct X bit errors in each block). But over time, more bits fail (charge leaks away) and the block content is lost. It is depending on your filesystem how you handle that. The filesystem can only see the block is flagged "corrupt". If this is part of your executable binaries, it should mark the whole file (multiple blocks) lost. And probably it will do that for the other file formats also. But in case it is a JPEG or MPEG file, recovery/repair could still be a valid option (family photo's). But I am not sure how a filsystem handles that, and if recovery is an option. It all depends on what is lost. So in essence: I don't know. Volhout The horrid is that the number on this scary. When you have amodern high capacity eMMC/SD card, and write data and storage at 50+ degrees C (depending the temp rating of the card), 300 hours without power is sufficient for bit fails, and after 1000 hours it is not guaranteed they can be recovered. In 99.9% of cases they still can, but no guarantee is given anymore. For mission critical applications that is the number to work with. That is only 40 days .... Temperature is major in this. At 25 degrees the numbers are far, far more friendly. But storing family photos on SD card for years in the attic, where in summer it can reach 50C easily, may not be a good idea. Edited 2025-01-24 20:43 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 3907 |
Thanks, very interesting. Suppose it's just an SD card or SSD with data no longer needed but has been left without power for ages. Then you try to erase it (by writing 1s (or 0s) to all of it) - will it work for new data written after that? I suppose you'd have to "format" (repartition etc), but will it then be OK? ("format" used to be something else, with disks it meant writing sector stuff, timing info etc, not really relevant for SD / SSD) John |
||||
CaptainBoing![]() Guru ![]() Joined: 07/09/2016 Location: United KingdomPosts: 2098 |
hmmm... this is backed up by GRC - he has recently updated spinrite to refresh SSDs - the areas where the data doesn't move, degrade and become slow. Re-writing the data in the same block refreshes the data and so increase the speed. I must say I don't really understand the underlying tech of SSD but he makes a point and a recent frefresh on one of my machines here has defo made a difference GRC h |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4528 |
huh... back to DOS ? Volhout PicomiteVGA PETSCII ROBOTS |
||||
circuit Senior Member ![]() Joined: 10/01/2016 Location: United KingdomPosts: 247 |
Integrity of long-term storage is certainly an issue; I have a number of old recordable CD data disks that are no longer accessible. Following this thread, I dug out some old compact flash cards that are over twenty years old and have not been accessed during that time. I put them into a card reader and found all the images and videos were intact; images from 2004-5 from an early Nikon digital camera. Checked out five cards and all were readable. Now to dig out an old digital camera that supports Compact Flash cards and see if the things are still fully operational. Time to get into the attic... Edited 2025-01-25 05:30 by circuit |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 9512 |
PhenixRising: Don't know if this helps but V6.00.02b4 will include MM.INFO(BOOT) returns POWER, RESET, or WATCHDOG depending on what cause the firmware to restart. Permanent OPTION commands and CPU RESTART will both report WATCHDOG as will a real H/W watchdog. Both a H/W and software watchdog will set MM.WATCHDOG to 1 |
||||
PhenixRising Guru ![]() Joined: 07/11/2023 Location: United KingdomPosts: 1024 |
Don't know if this helps but V6.00.02b4 will include MM.INFO(BOOT) returns POWER, RESET, or WATCHDOG depending on what cause the firmware to restart. Permanent OPTION commands and CPU RESTART will both report WATCHDOG as will a real H/W watchdog. Both a H/W and software watchdog will set MM.WATCHDOG to 1 Spectacular ![]() ![]() My original need was; initializing the zero-position of servo axes (big-ish machine) can be a PITA (slow). I needed the flag to indicate that the machine had/had-not been referenced. |
||||
PhenixRising Guru ![]() Joined: 07/11/2023 Location: United KingdomPosts: 1024 |
GRC h Awesome ![]() ![]() I am familiar with Gibson Research from the 80's. I have a guitar FX pedal that takes the Type-1 CF card, 2GB. I sourced some on eBay and they just wouldn't be recognised "Insert disk for drive e:" On the GRC site, there are some free utilities. I downloaded "InitDisk" which instantly brought my CF cards to life ![]() Cheers, Cap'n |
||||
![]() ![]() |
![]() |