Macropad CPY drive corrupting itself regularly

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
dearmash
 
Posts: 66
Joined: Mon Nov 28, 2011 4:20 pm

Macropad CPY drive corrupting itself regularly

Post by dearmash »

Info_UF2

Code: Select all

UF2 Bootloader v2.0
Model: Raspberry Pi RP2
Board-ID: RPI-RP2
boot_out.txt

Code: Select all

Adafruit CircuitPython 7.3.3 on 2022-08-29; Adafruit Macropad RP2040 with rp2040
Board ID:adafruit_macropad_rp2040
I'm effectively running the stock demo from https://learn.adafruit.com/macropad-hot ... oject-code with customized macros and I'm running into the issue if I disconnect / reconnect my device, the lib/ and macro/ folders get corrupted in a way that they just show up as 0 byte executable files to my OSX machine.

Strangely enough, the code.py is not affected by this. It does mean though that every so often I need to delete the empty files, and reupload them to the device from my computer. After losing them a few times now, I finally have backups.

I haven't run into this issue for the first long while since getting it in the Adabox. It's happened to me now at least 4 times since the new year. Not sure if there's any additional info I can give, or debugging steps you can provide

User avatar
neradoc
 
Posts: 542
Joined: Wed Apr 27, 2016 2:38 pm

Re: Macropad CPY drive corrupting itself regularly

Post by neradoc »

Could you have some new software or some update that accesses the drive ?
What version of the OS is running ?

Have you tried disabling the USB drive ? I use something like that, to put in a boot.py file, which makes the drive hidden, and only appear when you hold the first key down when the board boots, if you want to make modifications.

Code: Select all

import board
import digitalio
import storage
key1 = digitalio.DigitalInOut(board.KEY1)
key1.switch_to_input(digitalio.Pull.UP)
if key1.value: # not pressed
    storage.disable_usb_drive()

User avatar
dastels
 
Posts: 15656
Joined: Tue Oct 20, 2015 3:22 pm

Re: Macropad CPY drive corrupting itself regularly

Post by dastels »

Are you ejecting cleanly before disconnecting?

Dave

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”