Read some data off of the sd card
These series of commands are enough to read the first 512b block off of the sd card. The RCA is hard coded to the sd card that I have on hand, since response codes are not supported
This commit is contained in:
12
sw/main.c
12
sw/main.c
@@ -47,8 +47,20 @@ int main() {
|
||||
cprintf("Reading from 0x4000: %x\n", *(unsigned int*)(0x4000));
|
||||
cprintf("Reading from 0x5000: %x\n", *(unsigned int*)(0x5000));
|
||||
|
||||
// This will read a 512 block from the sd card.
|
||||
// The RCA is hard coded for the one that I have on hand as responses
|
||||
// are not implemented yet.
|
||||
sd_card_command(0, 0);
|
||||
sd_card_command(0x000001aa, 8);
|
||||
sd_card_command(0, 55);
|
||||
sd_card_command(0x40180000, 41);
|
||||
sd_card_command(0, 55);
|
||||
sd_card_command(0x40180000, 41);
|
||||
sd_card_command(0, 2);
|
||||
sd_card_command(0, 3);
|
||||
sd_card_command(0x59b40000, 7);
|
||||
sd_card_command(0x59b41000, 13);
|
||||
sd_card_command(0, 17);
|
||||
|
||||
while (1) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user