RP2350 Thing Plus internal filesystem accidentally erased by USB host?

An odd thing happened with one of our prototypes today. After a successful demo at a client site, my co-worker decided to top off the battery charge by plugging the unit into the USB port in his car. When we arrived at the next site and unplugged it, the unit would no longer boot up. When I plugged it into my laptop and connected to it with Thonny, I was very surprised to see the internal filesystem visible to Thonny was 100% blank. At least a dozen .py files, directories, and packages totally gone. The board was still fully functional once I reloaded our code on it, so the Micropython environment had not been affected at all, only the module storage area.

This unit has been thoroughly stress tested for over a month, and in that time has been plugged into numerous laptops and desktops (both Windows and Mac), as well as a variety of USB chargers and power bricks…and it’s never suffered any damage or loss to the filesystem until now. The only (rough) theory I have is that the audio head unit in his car tried to access the filesystem via USB and somehow corrupted or initialized the module storage area. However the board definitely wasn’t put into bootloader mode, so it shouldn’t have been exposed as a USB mass storage device, so I don’t know if that’s even plausible.

Questions:

  1. Any idea how this could have happened? Could a USB host like a car audio head unit somehow erase the MicroPython module storage area without damaging the MicroPython environment itself?

  2. Assuming we deploy some of these prototypes to clients and no longer have supervision over what they’re being plugged into, are there steps we can take to prevent this from happening again? I’m guessing that freezing our modules by compiling them into a custom .uf2 image might be the answer? (which we were planning to do anyway before letting any of the devices out into the wild) Anything else come to mind?

TIA!

I would try posting this in the Raspberry Pi forums and see what they say….but it does sound kike the car’s head unit did something wonky to it