SD MMC with STM32

Hi,

The STM32F103-STK is made with the Cortex M3BT6 that can handle only

2 SPI. My main problem is that I need to implement another chip that is SPI and send data most of the time.

Some possibilities may be :

  • I don’t need the RF transceiver on SPI1 and the accelerometer on I2C1, doing something with these free pins, but as the RF was sharing SPI1 with the Nokia LCD, i’m not sure to be able to use the both, is it ?

  • another solution would be to move the SD_MMC from SPI2, could it be on a free USART instead ?.

Hello,

You may try the official STM32 support forum too: http://www.st.com/mcu/forumsid-23.html

Perform a search there, may be your question was already answered.

regards,

Giovanni

thanks for that clue,

I also just found a yahoo group for that

I’m not familiar with the processor, but in general multiple SPI peripherals can share the same SPI lines, you just need one chip select per peripheral. Sometimes the processor’s SPI hardware has multiple chip selects available, other times you just have to use a spare I/O pin. That way you can have one set of SPI pins on your processor, but many connected SPI devices.

I hope that makes sense and helps

In fact the Cortex STM32F103 has 2 SPI, and they are in use.

Nevertheless, as you propose a multiplexed solution could resolve this, the SPI Slave select signal could give 4 slaves addresses.

In order to select slaves you may use any IO pin so you don’t have a real limit.

The only problem with this is if you plan of doing hot plugging, as example by inserting a MMC/SD card while the bus is being used by another peripheral. This does not seem to be you situation.

exact, but the SPI interface has this advantage to synchronise all the SPI signals, the IO is of course the simplest solution (as there is free IOs)