External SD card access

I realize OpenMV provides its own SD card, but sometimes you want to utilize an external SD card. For example, I’m working with an Arduino shield that has its own SD card. In Arduinoland, it is accessed from the Arduino SD.h library, which uses SPI to interact with the SD card. There is an SS pin on the shield that you set high or low accordingly, and then SD.h can read and write from the SD card.

Over in PyBoardland, the machine module includes SD support, although emphasizes that it is only intended for some specific one-off use, so I’m not sure this would work on PyBoard anyway, but in OpenMV, machine doesn’t even seem to include those SD options. Is there a completely different module or set of routines I should be using? Can I use an SD card that is on some external SPI-based system?

I realize that with enough elbow grease I could write an SPI SD library from scratch, since SPI is already supported, but I’m asking if there is a SD support already included that I have somehow overlooked?


That SD module is for a specific port (WiPy), we use the MicroPython SDIO driver in the stm32 port, also the storage needs to be mounted at boot time (and can’t be changed later). Anyway at some point we used our own SDIO and SPI drivers, the old SPI driver is still around if you want to use it as a start:


There’s no guarantee that it still works or that it will even compile, I just kept it for no reason.

@kwiley - Now this is a feature request too far :slight_smile:

Never a feature request, always an inquiry to current capabilities that I’m unsure I’m aware of. No worries.

The external card is not working properly on Windows 10. It is happening after updating my device. I want to fix Windows 10 Automatic Repair. Is there any solution?

Um, I’m not sure what you are talking about. He link you gave is too your computer being broken.