This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

MCB-STR9 SD card operation - made it work?

It seems the str9 processor will always loop-back data sent on the SSP if the NSS pin is low. This is true whether that pin is programmed as an input or output. In order to create a chip select signal to use the SD card in SPI mode then, I cut the track and use another GPIO pin for the purpose.

This fixed the "always looping back" problem and lets me read replies from the card.

However, I'm still having trouble. The card never seems to go into SPI mode. Has anybody got this working?

Dave

Parents
  • I added pullups to all the lines, and it made little difference, although it did change the responses somewhat.

    As a last resort, I wrote "bit banged" SPI send and receive routines. That is, I don't use the SSP at all, but control the pins directly as GPIO. Now everything works perfectly!

    Maybe there is something about the SSP signals in idle states that the SD card (a Sandisk 1 Gig card) doesn't like. I'd still like to get the SSP working in order to improve speed and reduce the processor load.

Reply
  • I added pullups to all the lines, and it made little difference, although it did change the responses somewhat.

    As a last resort, I wrote "bit banged" SPI send and receive routines. That is, I don't use the SSP at all, but control the pins directly as GPIO. Now everything works perfectly!

    Maybe there is something about the SSP signals in idle states that the SD card (a Sandisk 1 Gig card) doesn't like. I'd still like to get the SSP working in order to improve speed and reduce the processor load.

Children