STR-P711 and SD/MMC

Does anyone have experience with using the SD slot on the STR-P711 board? I’m attempting to use it but running into a problem. If I set the SS1 pin to be GPIO (in order to use it to select the SD card), whenever it is set low it appears the SPI1 peripheral doesn’t operate (no clock or data comes out). The STR711 manual says “The SS on the master must be deasserted high”, and additionally the SD/MMC example code on the Olimex site appears to be using IO port 0 bit 12 as the chip select (instead of SS1). This makes it appear to me that SS1 cannot be used as a chip select signal in master mode. What am I missing here?

Thanks in advance.

I believe I have found the answer to my own question, so I’m posting it here in case anyone else runs into the same problem.

The SS1 signal out of the ARM cannot be used to select the SD card as I suspected. The Olimex code apparently expects there to be a jumper between P0.12 (which is one of the pins right next to UEXT, I didn’t see it at first) and SS1 on the SPI1 header. Additionally, there is a resistor (R47) in between the SS1 signal on the ARM and the other SS1 connections (which doesn’t appear on the schematic as far as I can tell), which allows you to set SS1 to an output and assert it while at the same time pulling SS1 low on the SPI1 header without creating a short.

If anyone from Olimex reads this, it would have been helpful if this information had been posted somewhere. Perhaps a README in the SD/MMC code on the Olimex site?

Thanks for sharing this info…it probably saved me a lot of grief.

There is indeed a 2.2k resistor between the SS1 on the chip and the rest of the connections. However, I also noticed a 220 ohm resistor between P0.12 and SS1 on my board. (Both of these resistors are on the back of the board.) I don’t know if you actually connected a wire between the two pins, but it appears to work fine without it, with the 220 ohm resistor as the “jumper”.

nyvhek:
Thanks for sharing this info…it probably saved me a lot of grief.

There is indeed a 2.2k resistor between the SS1 on the chip and the rest of the connections. However, I also noticed a 220 ohm resistor between P0.12 and SS1 on my board. (Both of these resistors are on the back of the board.) I don’t know if you actually connected a wire between the two pins, but it appears to work fine without it, with the 220 ohm resistor as the “jumper”.

So you both agree that you can not use the SS1 Pin as an GPIO while you are using the SPI1? because thats what I’m trying at the moment. I have configured SS1 as TTL Push pull, and make my chip select signal with this. But i only read 0x00 from my MM-Card.

Could anyone of you update the olimex schematics?

http://www.olimex.com/dev/images/str-p711-sch.gif

Just paint the resistors, so that I can see what you tryied to say… :wink:

Hi all,

I have STR-P711 development board,too.I am able to make SD card work in SPI mode,I mean I can use SD card socket.After all my troubles,I want to make something clear for all STR-P711 users :slight_smile:

1- you can not use P0.7 (SS1 pin) to select the SD/MMC card because when you select SD card by pulling SS1 to low,you make your microcontroller SLAVE,not master.(you can check from STR7 user manual) So you should use some other pin, P0.12

2- Both P0.12 and P0.7 should be configured as output and you should pull P0.7 high ALL THE TIME and pull P0.12 low/high anytime you are supposed to.

You can check what I mean from the schematic from olimex site.

http://www.olimex.com/dev/images/ARM/ST … -C-sch.gif

you can easily see the 2.2K ohm and 220 ohm resistors.

Hope you all get your projects work…Good luck…