I have the microSD click board (bottom left in the image above) in the mikroBUS port 1 on the Discovery shield which translates to the following pinout:
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I am trying to get my head around connecting up a microSD card using SPI and wouldn't mind a bit of guidance, especially since I am new to Espruino.
Some background:
I am using the following hardware
which pretty much looks like this:
I have the microSD click board (bottom left in the image above) in the mikroBUS port 1 on the Discovery shield which translates to the following pinout:
mikroBUS port 1:
SD card pin -----------> STM32F4 Pin
2 (CS) -------------------> B12 (CS)
3 (DI) -------------------> B15 (SPI2 MOSI)
5 (SCK) -----------------> B13 (SPI2 SCK)
7 (DO) ------------------> B14 (SPI2 MISO)
Goal:
Is obviously to read from and write to the SD card.
I found the following conversation on the Espruino forum where @Gordon alludes how to go about using SPI to get this working but I am still a bit lost.
I see that the filesystem module is only supported on boards with a SD card slot
@Gordon says in his comment above to, "just stick with normal SPI"
Getting the SPI setup seems very straight forward:
SPI setup comments:
Once the SPI is taken care of how does one deal with reading and writing files with normal SPI?
Any help greatly appreciated!