update SPI commands and interaction protocols authored by Mona Angelina Raphaela Schappert's avatar Mona Angelina Raphaela Schappert
......@@ -17,10 +17,11 @@ Our implementation realizes a subset of all possible SPI commands, namely the co
### Initialization:
Before we can interact with our device we need to run `CMD0` and then `CMD8`. In case of a non-expected response, a step is repeated.
Before we can interact with our device we need to place the SD card into SPI mode. Afterwards we run `CMD0`, followed by `CMD8`. In case of a non-expected response to each of these commands, they are repeated until the expected response has been received.
1. `CMD0` with argument `0x0` and CRC `0x95`. Expected response: `0x01`
2. `CMD8` with argument `0x000001AA` and CRC `0x87`. Expected response: `0x01`, and a subsequent echo of the argument.
0. Set `MOSI` and `CS` to high and toggle `SD_CLK` for 74 or more clock cycles. Then set `CS` to low.
1. Run `CMD0` with argument `0x0` and CRC `0x95`. Expected response: `0x01`
2. Run `CMD8` with argument `0x000001AA` and CRC `0x87`. Expected response: `0x01`, and a subsequent echo of the argument.
TODO: 0x1AA seems to be a common value, others also possible, investigate best practices.
......
......