cancel
Showing results for 
Search instead for 
Did you mean: 

Where is the UsbMassStorage Examples / Supt for stm32f4xx ? - Solved

jlchoobs
Associate II
Posted on April 18, 2012 at 06:58

I have an obvious question :

How do I implement SDCard as MassStorage on the Stm32f4Discovery Board ?

Why is there Examples of this for the stm32F103 but not for the stm32F4discovery ?

The wonderful 22examples for the Discovery are a lot less than the stm32f103 examples present.

It seems like it should be a simple modifying of code.

But, I find no examples or support for this anywhere at Stm or on the internet (besides my site).

Has Anybody tried this Project yet ?

#stm32f4discovery #stm3240g #epic-fail #msc
35 REPLIES 35
Posted on July 09, 2012 at 13:07

Probably because you have not wired the breakout board in a suitable manner, with pull up resistors. The pin assignments for the SDIO interface are critical, the CARD DETECT is just an available GPIO. Get the pins wrong and the data will be garbled.

The example code from ST assumes the cards support a 4-Bit interface.

To debug, read and dump sector/block zero, which should contain a valid MBR (Master Boot Record, Partition Table). Review the SDCard demo example in the firmware libraries.

0690X00000602lEQAQ.jpg

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
rishi
Associate II
Posted on July 09, 2012 at 17:19

i connected my card as shown in the diagram....with all the given pullups...still i am getting the error...nd one thing i want to tell you...my LSE is not running...i dont know why...how i checked it is by checking the signals at PH0 and PH1...no waveform is coming on these pins...it was coming before when is used my board for discovery...bt after one or more resetting the board the LSE is not configuring....help needed

Posted on July 09, 2012 at 20:25

I'm having a hard time deciphering that, please use sentences, paragraphs, and complete words.

The HSE (High Speed External) connects via PH0/PH1, these will not appear at pins on connector P2 unless solder bridges SB13,SB14 are made. This would be an 8 MHz crystal for the discovery board, but could be 16 or 25 MHz on other boards.

The LSE (Low Speed External) crystal is not populated on my discovery board, if you have placed your own you need to be sure it's a 6 pF crystal (STM requires less than 7 pF, so 9 or 12 pF crystals aren't suitable, and potential won't start, or start erratically. You'll also need to remove SB15,SB16 so the PC14 and PC15 don't give you long leads to connector P2.

Please refer to the schematic/manual.

http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/USER_MANUAL/DM00039084.pdf

I'm doing my SD Card work with a custom F2 board. I don't have a lot of time or resources to hack away on the F4 discovery, or it's suitability to do SDIO.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
jlsilicon2
Associate
Posted on November 21, 2012 at 07:52

Hey Clive,

I have been successly using the Usb Mass Storage Demo on the Stm32f405 chip board.

But I want to move the Project down to the Stm32f103 chips (to save money and mounting complexity).

-> Is there a copy of the Demo Lib usable with Eclipse Gcc for the Stm32f103 ?

And, what do I need to do to get it to compile properly under Eclipse Gcc ?

Thanks !

Posted on November 21, 2012 at 13:13

I think you need the older USB library code, this does have some SDIO code for F10x series chips. The Mass Storage example will need to be ported as it was coded for NAND flash on one of the EVAL boards.

http://www.st.com/internet/com/SOFTWARE_RESOURCES/SW_COMPONENT/FIRMWARE/stm32_usb-fs-device_lib.zip

http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/USER_MANUAL/CD00158241.pdf

I'm not particularly into Eclipse, from a GNU/GCC perspective the code in the RiDE tree is usually the way to go. I remember WinARM having support and linker scripts for the F10x parts a long while back, but these days I'd probably go directly with Yagarto and a makefile.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
bikash
Associate II
Posted on December 29, 2012 at 13:02

Hello all,

         Can anybody help me out on how can I use the above library for STM32F103fz to detect SD card(SPI interfaced to micro-controller) as a mass storage device when the USB is connected to PC. As I am new to USB so need your help.

Thanks in advance.