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
SDC on F0.
Moderator: RoccoMarco
- 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.
So, what I'm missing is the data of those initialization commands: my MOSI line is always high....
Update: Ah, The every ms is:
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.
Update: Ah, The every ms is:
Code: Select all
#if MMC_NICE_WAITING == TRUE
/* Trying to be nice with the other threads.*/
osalThreadSleepMilliseconds(1);
#endifUpdate2: 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.