|
Forum Index : Microcontroller and PC projects : Help me to corrupt the Raspberry Pi Pico2 flash with MMBASIC
| Author | Message | ||||
| Amnesie Guru Joined: 30/06/2020 Location: GermanyPosts: 734 |
Hello, I would like to find out how many write cycles the Raspberry Pi Pico 2 can tolerate before it becomes faulty (I know it should be around 100.000). My first question is: - Does MMBASIC have some kind of "flash wear leveling"? (even if so, it would become even more interesting!) Is it possible to achieve this using the "CHAIN" command by constantly switching between two different programs? In doing so, I would simply increment a variable. However, I'm wondering how I could reliably determine that a sector has become corrupted over time, since I am only reading / incremeting one variable. Maybe I should use more variables to hold data. But I am sure there are even better ways, so this is why I am asking. Please let me hear your suggestions for a good test set-up! As far as I know, the Raspberry Pi Pico's onboard flash memory is typically rated for around 100,000 write/erase cycles per sector. One day has 86400 seconds, CHAIN process consumes also time which depends on the program size, so let's say one CHAIN cycles takes 10 seconds (with back CHAIN) we could achieve 8640 write cycles a day. The Raspberry Pi Pico should at least work for around 11 days without errors, right? Why I am curious: I have more and more programs which make use of CHAIN loading from sdcard (because of program size) and I wanted to know at what point it becomes crititcal. Greetings Daniel Edited 2025-12-21 21:15 by Amnesie |
||||
| ville56 Guru Joined: 08/06/2022 Location: AustriaPosts: 352 |
Why not use var save ? Doesn't take 10 seconds and also uses flash ... You could save, say, 1000 times and read back the 1001 value to see if it still matches... or so. But if you have bad luck the flash gives you 1000000 cycles. If the cycle count is also saved, you could make it reboot stable and thus cover power failures which will come in the future... 73 de OE1HGA, Gerald |
||||
| twofingers Guru Joined: 02/06/2014 Location: GermanyPosts: 1706 |
Hi Daniel, this reminds me of my test with a EEPROM 11 years ago. Interesting question. Kind regards Michael causality ≠ correlation ≠ coincidence |
||||
| Amnesie Guru Joined: 30/06/2020 Location: GermanyPosts: 734 |
@ Gerald thanks for the input - I will take a look into the manual! @ Michael Ha, that's interesting! Seems EEPROM hold up longer than Atmel stated in the datasheet. That's good. Yeah, hard facts are better than just rely on the datasheet. Greetings Daniel |
||||
| ville56 Guru Joined: 08/06/2022 Location: AustriaPosts: 352 |
but what do you gain? A dead pico maybe, but no gain in knowledge IMHO. The sample size of 1 is a bit small to give some reliable answer to how many writes the pico flash can take. It's just an individual result you will never be able to reproduce again ... but well, mankind has done worse things out of curiosty .73 de OE1HGA, Gerald |
||||
| dddns Guru Joined: 20/09/2024 Location: GermanyPosts: 717 |
Agree ..you also need to fear, that overclocking makes it worse ;) |
||||
| Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 5543 |
Flash endurace specifiek by the manufacturer is far more reliable than anything you can do yourself. When you use MMBasic, flash is cached, and unless you exactly know what you are doing, you might be testing cache endurance. And you sample batch may be small. RP Will have tested with hundreds of chips in controlled climatic conditions. Volhout PicomiteVGA PETSCII ROBOTS |
||||
| dddns Guru Joined: 20/09/2024 Location: GermanyPosts: 717 |
Idea for Sylvester instaed of rockets: Use the Arduino IDE and write a short loop and start it 5 to 12. Please post your findings. Edit: OT - I didn't notice ![]() Edited 2025-12-22 05:48 by dddns |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |