Closed dolson56 closed 1 month ago
Does this still occur if you eject the device before unplugging?
There isn't much we can do from the CircuitPython side if you unplug without eject. Windows caches writes to the file system and unplugging prevents those from completing. Eject will write out those changes.
Closing for now since we haven't heard back.
CircuitPython version
Code/REPL
Behavior
Any code can be used to reproduce. The issue is the micro becomes un-writable. Furious, random unplugs and restarts of Mu can sometimes briefly recover the write-permission. No discernable pattern yet. It also helps if you curse out loud while doing this.
Description
Over time, the micro becomes more and more likly to appear as non-writable. You can't save to it. You see this when developing with Mu, however, you can verify the issue with windows file explorer. Also shows up as non-writable. I have tried to reinstall CP as recommended on CP.org(link) and this has fixed the issue for a time, but the issue re-appears. I have also tried storage.erase_filesystem(), this had no better success than the re-install.
This project involves two systems linked by RFM69 radios. So all troubleshooting includes 2 RP2040's. I have learned late in this troubleshooting that a USB device 'eject' is a good idea for each unplug. I don't have extra RP2040's to try this out with - that is, doing eject each time from time zero to prevent this issue from coming back in the first place.
Additional information
Windows 10 PC. I have a really big doc to describe the project, however I don't think the issue is related to anything but the USB plug and un-plugs. I'll attach the write all the same. Anti Parking Ticket System Description.docx