cancel
Showing results for 
Search instead for 
Did you mean: 

Interface an in-house board governed by an STM32F070RB mcu, with a simple SD card socket

EVard.10
Associate II

Hello friends. the question is above.

My plan is to take our in-house circuit, and connect an sd card "breakout" (i'm not sure how to call it.. is it caled a "socket"? an "adapter"? please correct me if i missuse the terminology), via an SPI peripheral (MISO,MOSI,SCLK), so that i would be able to write a lot of data at a high rate. read speed is not an issue btw

more detailed questions:

  • what type of SD breakout should i use?

basically i need to write about 12000 long values in one second.

a long is 4 bytes in my case, so this comes to the speed of about 48,000 Bytes/sec

Afaik the base minimum speed of the most basic SD card does provide this.

please verify this fact (or tell me that i'm wrong..)

interface:

  • What breakout module should i buy, so that i'll be able to connect to the most basic cards?

Is it possible to connect any breakout to any SPI interface? provided that all the electrical signal properties are met of course.

I had a look at this page and for the example i selected this product. will it work with the STM32F070RB? how can i know whether it will or wont?

  • Finally, on the software side, i'm looking for a basic software implementation as i do not wish to learn the SD protocol from scratch.

In my search I've found this nice page which relies on the HAL drivers (doesn't matter to me), but again i'm not sure about the breakout module.

does some1 knows of a good simple driver that is suitable for the required task

Its a big question I know. Any information will be much much appreciated.

Thank you in advance

2 REPLIES 2

The DFRobot one looks targeted at 5V systems, and has a voltage divider on the pins.

I'd probably use something like this

https://www.waveshare.com/micro-sd-storage-board.htm

There is an Adafruit shield driver and FsFat examples in the CubeF0 example tree

STM32Cube_FW_F0_V1.10.1\Drivers\BSP\Adafruit_Shield\stm32_adafruit_sd.c

STM32Cube_FW_F0_V1.10.1\Drivers\BSP\STM32F0xx-Nucleo\stm32f0xx_nucleo.c (SD SPI IO)

STM32Cube_FW_F0_V1.10.1\Projects\STM32F091RC-Nucleo\Applications\FatFs\FatFs_uSD\readme.txt

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
EVard.10
Associate II

Thank you clive. much appreciated.

My company cannot buy the module you specified, but i think i understand why you choose that module over the DFRobot one

I hope the adafruit source will work with whatever sd reader i'll get on my table.

I'll update when possible.