SDC on F0.

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: SDC on F0.

Post by Giovanni »

The clock pulses with CS high are expected, it is the procedure for enabling SPI mode on the SD card. What follow are initialization commands.

Giovanni
rew
Posts: 383
Joined: Sat Jul 19, 2014 12:59 pm
Has thanked: 2 times
Been thanked: 14 times

Re: SDC on F0.

Post by rew »

So, what I'm missing is the data of those initialization commands: my MOSI line is always high....

Update: Ah, The every ms is:

Code: Select all

#if MMC_NICE_WAITING == TRUE
    /* Trying to be nice with the other threads.*/
    osalThreadSleepMilliseconds(1);
#endif


Update2: Reading the init code... I would suggest adding:
http://prive.bitwizard.nl/mmc_spi.patch
This adds an unselect to the initialization where you said this must happen with CS disabled. In my code this is already the case, but you never know how stuff ends up. After starting to post this, I thought: Maybe it's in the initialization of SPI, but I couldnot find it there.
Post Reply