I picked up a Nicla Vision board because it seemed to have most of what I needed. The one thing I’m missing is some storage for partially disconnected scenarios. I’ve wired up an SD Card slot on the SPI bus and everything seems like it should be good, but I have not been able to find any way to actually access it in OpenMV. Any ideas or directions to look? I checked the new Nicla examples that just dropped in the GitHub repo, but haven’t found anything yet.
Normally SD is mounted as storage device when connected to PC and the filesystem is accessible as usual instead of the internal flash FS. However, SD card driver are Not configured or enabled for this board by default, because it does not have a card socket and the SDIO pins are not broken out. We had an SPI mode SD card driver at some point long ago, but it’s no longer available neither in our code nor in upstream Micropython, as far as I know there are No drivers for SD SPI mode for the stm32
port.
I’m not really worried about it being mounted to a PC - just to be able to use the storage with my code on the board itself. Not supporting additional local storage seems like a pretty large gap in the feature set. Is there a different way that would be a better approach to getting some offline storage on this board?
The onboard flash is an offline, non-volatile storage, a secondary storage is Not going to be more reliable/useful somehow. It might be possible to connect a second SPI flash or (QSPI flash in software mode) but again this board is not configured for that by default. Also I never tested two block devices like that before so not sure how/if it works. Have you considered an EEPROM maybe ? If you just want to store some bytes.
It’s possible to use the MicroPython machine interface to create a block device and then add a FAT file system to that.
We don’t really expose that documentation because it’s not something our users would want to do normally. However, if you look at the main MicroPython documentation for the PYBoard is possible in very few lines of code.
I have no idea if the said feature actually works though.
Thanks - the problem with the internal storage is that it is severely limited for data capture. It looks like I’ll need to drop back to wiring for this board or just use a different one for my project. I guess I hadn’t realized the focus was so tight for this one.
See: Working with filesystems — MicroPython 1.12 documentation
And: class SDCard – secure digital memory card — MicroPython 1.19.1 documentation
Thanks, I’d already tried that but the machine namespace doesn’t seem to have an SDCard method for the board. It could be that there’s something else to tweak on the includes, but I don’t see where.