mmc over spi

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

Post Reply
darknoobie
Posts: 4
Joined: Sun Sep 25, 2011 8:38 pm

mmc over spi

Post by darknoobie »

i was wondering if anyone could point me to a schematic on connecting a sd card to spi port. im trying to write a file to my sdcard using chibiOS
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: mmc over spi

Post by Giovanni »

Hi,

You may examine the schematic of an existing board, try on www.olimex.com, the STM32-P103 board for example.

Giovanni
darknoobie
Posts: 4
Joined: Sun Sep 25, 2011 8:38 pm

Re: mmc over spi

Post by darknoobie »

ty so much. i wish yall know how much chibiOS has helped me. I recently suffered from depression. And playing around with chibiOS and how awesome it is has kept my mind off things. Easy to use and powerfull :D
darknoobie
Posts: 4
Joined: Sun Sep 25, 2011 8:38 pm

Re: mmc over spi

Post by darknoobie »

Also I forgot to mention Im using the stm32100rb. Is the mmc driver designed to work on spi1 or spi2? And i changed:
#define HAL_USE_MMC_SPI TRUE
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: mmc over spi

Post by Giovanni »

You can use any SPI port supported by the SPI driver (just enable it in halconf.h and mcuconf.h).

Giovanni
darknoobie
Posts: 4
Joined: Sun Sep 25, 2011 8:38 pm

Re: mmc over spi

Post by darknoobie »

I forgot to ask. when interfacing the stm32 discovery board via spi2. Which pin is the chip select
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: mmc over spi

Post by Giovanni »

Hi,

You can use any GPIO pin as chip select.

Giovanni
Post Reply