--- In lpc2000@yahoogroups.com, "armqamp" <wouter@w...> wrote:
>
> I defined the commands like this:
>
> #define CMD0 0x40 // software reset
> #define CMD1 0x41 // brings card out of idle state
> #define CMD2 0x42 // not used in SPI mode
> #define CMD3 0x43 // not used in SPI mode
> #define CMD4 0x44 // not used in SPI mode
> #define CMD5 0x45 // Reserved
> #define CMD6 0x46 // Reserved
> #define CMD7 0x47 // not used in SPI mode
>
> and so on...
>
>
> thanks,
>
> Wouter
>
Rest of the code looks good, except for that:
if(i>10){
SD_disable;
print("SD activation failed\n");
}
else{
print("SD activation successfully\n");
}
If "SD_disable" is just setting CS high, you'd better do it every time after sending command (and getting response), not only if something failed.
MaxMessage
Re: SPI / SD on lpc2106
2005-10-11 by theothervmax
Attachments
- No local attachments were found for this message.