Hi, On Mon, Jan 02 at 02:23, Damien Maguire wrote: ... > have been struggling to find a good example of using a uSD card with a > 32F1 using libopencm3. Perhaps someone could point me in the right > direction?
Useful sources for information on interfacing and initialising SDcards: http://elm-chan.org/docs/mmc/mmc_e.html http://elm-chan.org/docs/mmc/m/sdinit.png http://www.cl.cam.ac.uk/teaching/1011/P31/lib/diskio.c None of them reference/use libopencm3 but still useful reading. I have code for STM32F401 libopencm3 that will take you from initialising GPIOs to reading sectors from the card and determining it's size. A couple of Blackpill cards are what I had spare for a project but no reason the codes shouldn't be easily ported to STM32F1, that's kinda the point of libopencm3. Read only operation as that's all I need for my project, but sector write would be an easy addition. Don't have any FAT filesytem code as planning to use a readonly EXT2 filesystem. Because... I can email you the relevant files if you want. I have my own some would concider crankey style and it's not ready for public distribution, but it's well commented in my opinion, compiles and runs. -- Bob Dunlop _______________________________________________ libopencm3-devel mailing list libopencm3-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libopencm3-devel