cancel
Showing results for 
Search instead for 
Did you mean: 

STM32373C_EVAL with SDHC

alexandersleptsov9
Associate II
Posted on November 26, 2017 at 22:56

What uSD card I can use with STM32373C_EVAL?

Is it possible use SDHC card?

5 REPLIES 5
Posted on November 26, 2017 at 23:03

Both SDHC and SDXC work with STM32 boards, really a question of supporting software.

Wouldn't trust the software supplied on board >2GB

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Posted on November 26, 2017 at 23:08

Yes, this question is about software. I have tried STM32_USB-FS-Device_Lib_V4.1.0 and STM32Cube_FW_F3_V1.9.0.

Both of them work with FAT16 , but doesn't work with FAT32 (SDHC) card.

Posted on November 27, 2017 at 01:14

The STM32373C-EVAL_FW_V1.0.0, from 2012, has an older version of FATFS that should support FAT32, however the STM32373C-EVAL_FW_V1.0.0\Utilities\STM32_EVAL\STM32373C_EVAL\stm32373c_eval_spi_sd.c file is only good to 2GB. You'd need to port in a more recent SD SPI layer supportive of SDHC cards via SPI, for example STM32Cube_FW_F3_V1.9.0\Drivers\BSP\Adafruit_Shield\stm32_adafruit_sd.c

With a current version of FATFS you'd also be able to run EXFAT media.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
alexandersleptsov9
Associate II
Posted on November 27, 2017 at 21:45

Many thanks. STM32_The STM32373C-EVAL_FW_V1.0.0 has the same file stm32373c_eval_spi_sd.c as USB-FS-Device_Lib_V4.1.0, what I used before.  Adafruit library work with SDHC - write/read files OK, format SD still not work-

may be it my mistake. It was not so simple to install stm32_adafruit_sd.c instead of stm32373c_eval_spi_sd.c to

the STM32F373 project...

Posted on November 27, 2017 at 22:42

Not sure I suggested it was a zero effort exercise, but it should be manageable. Figure it will cost you a couple of hours if I do it.

Watch for the casting of the math, ST has this decade long stupidity of accessing block devices using byte offsets, and all the expense and danger of mapping those values back and forth. For >2GB you want to be using 64-bit math so the media doesn't trash itself.

I'm not sure if FATFS is sufficiently aware of the SD card blocking to format optimally, best to use the SD Card Association Formatter, which is aware of the natural block size on the media.

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