cancel
Showing results for 
Search instead for 
Did you mean: 

ST32f4discovery+sdcard+fatfs problem

arnold
Associate II
Posted on June 30, 2012 at 23:43

Hello, 

i have a small problem i think.

With the help of this forum and google i created a project with CoIDE.

What it should do is reading the directory of an SDCARD.

The SDCARD part is working. but the fatfs is not working and i don't know what i'm doing wrong. 

I believe everything is oke. 

so i hope someone could help me. 

I attached the whole project. 

#sdcard-stm32f4-sdio-fatfs
48 REPLIES 48
arnold
Associate II
Posted on July 11, 2012 at 07:49

Well in my opinion it is pretty complex.

I will compare the 2 projects and try to find out what was changed, and try to learn about it.

Thanks a lot for helping me out and have so much patient with this problem.

arnold
Associate II
Posted on July 11, 2012 at 07:54

Deleted, double post

arnold
Associate II
Posted on July 12, 2012 at 21:36

I can't get it to run in coocox.

but when running it with make from within the dir. 

It compiles and is working. 

So i think i'm going to run it from the commandprompt. 

the only thing i'm going to mis is the debugging that was in coocox.

i use stlink, and somehow i can't debug without coocox
Posted on July 12, 2012 at 21:46

Can't make CooCox work, but perhaps you can get it to make a donor project, and then stick in the ELF/BIN/HEX files generated externally and have it inject those when you start the debugger. The ELF file contains all the source code paths, so this works in Keil where you transplant the AXF file it thinks it just built with the ELF file output by the GNU/GCC tools.

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

The original post was too long to process during our migration. Please click on the provided URL to read the original post. https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I6bS&d=%2Fa%2F0X0000000brb%2FzCNtWFIURPxZNYwtQ_J6Snudb_gqzQ5JbKC6ScI0pEM&asPdf=false
Posted on July 13, 2012 at 22:34

That's a bit odd, confirm the out directory exists and the files aren't marked as read only. Check the version of make, I used the one from Yagarto's tool download.

make -v

GNU Make 3.81

Copyright (C) 2006  Free Software Foundation, Inc.

This is free software; see the source for copying conditions.

There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A

PARTICULAR PURPOSE.

This program built for i686-pc-mingw32

I thought I had fixed the make file with -DHSE_VALUE=8000000, might need to spin the release.

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

i have the same version. 

when i run the command which goes wrong from command line all goes well. 

it is hard to get it to work, just the way i want.

Wood.Andy
Associate III
Posted on October 25, 2012 at 14:44

Hi Clive

Just thought I would say thanks for stm32f4_discovery_msc_sdhc_release_3!

I loaded it into Atollic - changes as follows :-

stm32f4_discovery.h line ..

/**

* @brief SD FLASH SDIO Interface

*/

#define SD_DETECT_PIN GPIO_Pin_8 /* PC.02 */

#define SD_DETECT_GPIO_PORT GPIOA /* GPIOC */

#define SD_DETECT_GPIO_CLK RCC_AHB1Periph_GPIOA

Add to the start of usb_conf.h :-

#define USE_STDPERIPH_DRIVER

#define STM32F4XX

#define USE_STM32F4_DISCOVERY

#define USE_USB_OTG_FS

#define HSE_VALUE=8000000

The target board is the Waveshare Open407Z with their MicroSD card board and the PA9 to VBUS link needed to be added.

And off it went!

Enclosed is archive of project if anybody else is interested...

Lots of thanks

Andy.

________________

Attachments :

msc_sdhc.rar : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HtWh&d=%2Fa%2F0X0000000aRH%2Fw5mgdpcVhk_rev1neOg0Tj86vC7Lm7G6YAjIIVvT5j0&asPdf=false
Posted on October 25, 2012 at 16:57

Cool

The equivalent to -DHSE_VALUE=8000000 is

#define HSE_VALUE 8000000

The WaveShare boards look interesting, would be interesting to see the schematic, and examples.

Do they support USB HS?

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