Content originally posted in LPCWare by Rob65 on Sat Dec 10 00:48:33 MST 2011
Tabby,
there must be something wrong with the connections.
I have not yet tested with P0.6 as SSEL so there could be a problem in my software ...
If there is no card available (or if there is any problem with the connections) you get this error.
Could you debug and step through SD_Init() ?
When you step into the Send_Command() function you should see the SSEL line going low (just measure with a volt meter). If the line does not go low, check the peripheral view to see if P0.6 is indeed programmed as output pin and if it indeed is low.
The first instance of Send_Command() will send the GO_IDLE_STATE command.
This sends 40h 00h 00h 00h 00h 95h and after this only clock pulses are generated.
If the card accepted the command it should respond with a status that is not FFh within 8 bytes.
If this does not happen it is likely there is a problem with the SPI lines.
I'll see if I can check the P0.6 use today.
Regards,[INDENT]Rob
[/INDENT]