[INFO] SD module using SPI
[INFO] SD module using SPI
There's someone that can post a working project (possibly a demo) of an SD over SPI for a stmf32fx MCUtype? I've seen the mmc over spi driver provided by chibios (http://chibios.sourceforge.net/html/gro ... s_p_i.html) but I can't figure out how it works.
- tfAteba
- Posts: 547
- Joined: Fri Oct 16, 2015 11:03 pm
- Location: Strasbourg, France
- Has thanked: 91 times
- Been thanked: 48 times
Re: [INFO] SD module using SPI
Hi Pikumb,
I think that you can find your happiness here:
viewtopic.php?t=1385
There is some links to example code.
I think that you can find your happiness here:
viewtopic.php?t=1385
There is some links to example code.
regards,
Theo.
Theo.
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: [INFO] SD module using SPI
This reminds me that there is no demo for that since version 3.x....
Giovanni
Giovanni
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: [INFO] SD module using SPI
Nucleo boards don't have a connector, it is not very convenient.
Giovanni
Giovanni
- tfAteba
- Posts: 547
- Joined: Fri Oct 16, 2015 11:03 pm
- Location: Strasbourg, France
- Has thanked: 91 times
- Been thanked: 48 times
Re: [INFO] SD module using SPI
I understand you point of view, but in my case I was thinking about using an additional board like this one:
and make the wiring to the corresponding pins.
and make the wiring to the corresponding pins.
regards,
Theo.
Theo.
- tfAteba
- Posts: 547
- Joined: Fri Oct 16, 2015 11:03 pm
- Location: Strasbourg, France
- Has thanked: 91 times
- Been thanked: 48 times
Re: [INFO] SD module using SPI
In my case, I already have the Nucléo board and this module so that whit I suggest this solution.
But effectively, it will be easy to use a board that include the SD-card slot.
But effectively, it will be easy to use a board that include the SD-card slot.
regards,
Theo.
Theo.
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: [INFO] SD module using SPI
I have a card with a slot, adapting the demo to Nucleo should be very easy, everything is modular as usual.
Giovanni
Giovanni
- tfAteba
- Posts: 547
- Joined: Fri Oct 16, 2015 11:03 pm
- Location: Strasbourg, France
- Has thanked: 91 times
- Been thanked: 48 times
Re: [INFO] SD module using SPI
Cool, I will try to run it on the Nucléo board when you will summit the demo.
I'm a very busy at the moment but if I have the time, in next months, I will try to implement it my self.
I'm a very busy at the moment but if I have the time, in next months, I will try to implement it my self.
regards,
Theo.
Theo.
Re: [INFO] SD module using SPI
Sorry guys but I'm a newbie on chibios.
I want to use my stm32f303 discovery so all the work should be port these files (downloadable from the other topic you suggested) for the f4 to the f3. It was very simple beacuse I start a new project for my MCU and add fatfs libraries modifying only the makefile and add a bunch of directories and file. I try also to solve the mismatching between the other files like in mcuconf.h and halconf.h (but is common that these file are different and i switch to true all the things that I can according to the f4 files). The problem is for C libraries included in the main file and I can't figure out how to import them. Another problem is an error reported in the os file precisely in the GCC directory rules.mk file. I think this error shows because I've to fix all the differencies between the two MCU and I try to solve them in an incorrect way probably. Another error is in the sdc.h file where eclipse says that sdc_lld.h has "no such file or directory" but if I right click and select "Open Decalration" the correct file appears me. These two problem switching and other times both are stated and other times only one of the two. I post my port here hoping that once ported correctly, I can read and write some file on the SD using SPI.
ButIf this the process will reveal difficult, I would try to use the MMC over SPI solution that is contained in the Chibios HAL documentation. This seems to me like a very simple way to configure and use the sd reader (the one by sunfounder) that uses spi. There are a bunch of functions and seems to me that with some try and error I could simply can talk with the sd. If someone have a simple demo of the usage of this interface (MMC over SPI that should work also for SD card) will be very nice
I want to use my stm32f303 discovery so all the work should be port these files (downloadable from the other topic you suggested) for the f4 to the f3. It was very simple beacuse I start a new project for my MCU and add fatfs libraries modifying only the makefile and add a bunch of directories and file. I try also to solve the mismatching between the other files like in mcuconf.h and halconf.h (but is common that these file are different and i switch to true all the things that I can according to the f4 files). The problem is for C libraries included in the main file and I can't figure out how to import them. Another problem is an error reported in the os file precisely in the GCC directory rules.mk file. I think this error shows because I've to fix all the differencies between the two MCU and I try to solve them in an incorrect way probably. Another error is in the sdc.h file where eclipse says that sdc_lld.h has "no such file or directory" but if I right click and select "Open Decalration" the correct file appears me. These two problem switching and other times both are stated and other times only one of the two. I post my port here hoping that once ported correctly, I can read and write some file on the SD using SPI.
ButIf this the process will reveal difficult, I would try to use the MMC over SPI solution that is contained in the Chibios HAL documentation. This seems to me like a very simple way to configure and use the sd reader (the one by sunfounder) that uses spi. There are a bunch of functions and seems to me that with some try and error I could simply can talk with the sd. If someone have a simple demo of the usage of this interface (MMC over SPI that should work also for SD card) will be very nice
- Attachments
-
- RT-STM32F303-DISCOVERY-SDREADER-1.rar
- NOT WORKING!
- (2.01 MiB) Downloaded 152 times
Return to “Development and Feedback”
Who is online
Users browsing this forum: No registered users and 16 guests