Use SPI Driver | | | RETAIN | The SD card uses the SPI driver. SPI driver is automatically selected when you select the SD card driver. Retain this. |
| Driver Implementation | | RETAIN | Default is Dynamic. Retain this. |
| Use Interrupt mode | | RETAIN | Default is checked. Retain this. The Interrupt mode will allow the SPI driver task state machine to be run from the SPI interrupt |
| Use Polled mode | | RETAIN | Default is disabled. Retain this. You are using SPI in Interrupt mode. |
| Use Master mode | | RETAIN | Default is Enabled. Retain this. SPI will act in Master mode and SD card will be in SLAVE mode. |
| Use Slave mode | | RETAIN | Default is Disabled. Retain this. |
| Use Standard Buffer mode | | CHANGE | Default is diabled. Enable this. This definition controls whether or not Standard Buffer mode functionality is built as part of the driver. With it set to one then Standard Buffer mode will be compiled and bufferType = DRV_SPI_BUFFER_TYPE_STANDARD will be accepted by SPI_DRV_Initialize() |
| Use Enhanced Buffer mode | | RETAIN | Default is Enabled. Retain this. |
| Use 8-bit mode | | RETAIN | Default is Enabled. Retain this. This definition controls whether or not 8-Bit mode functionality is built as part of the driver. With it set to one then 8-Bit mode will be compiled and commWidth = SPI_COMMUNICATION_WIDTH_8BITS will be accepted by SPI_DRV_Initialize() |
| Use 16-bit mode | | RETAIN | Default is Disabled. Retain this. You will operate a single instance of SPI in 8-bit mode only. |
| Use 32-bit mode | | RETAIN | Default is Disabled. Retain this. You will operate a single instance of SPI in 8-bit mode only. |
| Use DMA | | RETAIN | Default is Disabled. Retain this. You will not use Direct Memory Access (DMA) for SPI transfers. |
| Number of SPI Driver Instances | | RETAIN | Default is one. Retain this. You will have a single instance of the SPI driver, only to interact with the SD card. |
| Number of SPI Driver Clients | | RETAIN | Default is one. Retain this. You will have a single client of the SPI driver, only to interact with the SD card. |
| Number of jobs created per instance | | RETAIN | Default is 10. Retain this. This definition along with DRV_SPI_INSTANCES_NUMBER and DRV_SPI_CLIENT_NUMBER controls how many buffer queue elements are created. |
| SPI Driver Instance 0 | | RETAIN | Default is Enabled. Retain this. You will be using SPI instance number 0 for interacting with SD card. |
| | SPI Module ID | CHANGE | Default is SPI_ID_1. Change this to SPI_ID_2. This links the SPI hardware peripheral with the SPI driver instance |
| | Driver mode | RETAIN | Default is Interrrupt mode. Retain this. This is the only option available as you have not enabled Polled mode in the Driver configuration. |
| | TX Interrupt Priority | CHANGE | Default is INT_PRIORIY_LEVEL1. Change this to INT_PRIORITY_LEVEL3. |
| | TX Interuupt Sub-Priority | RETAIN | Default is INT_SUBPRIORITY_LEVEL_0. Retain this. |
| | RX Interrupt Priority | CHANGE | Default is INT_PRIORIY_LEVEL1. Change this to INT_PRIORITY_LEVEL3. |
| | RX Interrupt Sub-Priority | RETAIN | Default is INT_SUBPRIORITY_LEVEL_0. Retain this. |
| | Error Interrupt Priority | CHANGE | Default is INT_PRIORIY_LEVEL1. Change this to INT_PRIORITY_LEVEL3. |
| | Error Interrupt Sub-Priority | RETAIN | Default is INT_SUBPRIORITY_LEVEL_0. Retain this. |
| | Master\Slave mode | RETAIN | Default is Master mode. Retain this. You do not have a Slave mode selected in the SPI driver configuration. So this is the only option. |
| | Data Width | RETAIN | Default is 8-bit. Retain this. This is the only option available as you n=have not selected 16- and 32-bit option in the Driver level configuration. |
| | Buffer mode | CHANGE | Default is Enhanced mode. Change this to Standard mode. You will run the SPI driver in the Standard mode. |
| | Allow Idle Run | CHANGE | Disabled by default. Change this to Enabled. SPI is allowed to run while the rest of the CPU is in Idle mode |
| | Protocol Type | RETAIN | Default is DRV_SPI_PROTOCOL_TYPE_STANDARD. Retain this. This enumeration identifies the various protocols of the SPI module. |
| | Clock To Use | RETAIN | Default is CLK_BUS_PERIPHERAL_2. Retain this. |
| | SPI Clock Rate | CHANGE | Default is 1000000. Change this to 20000000. The SD card can operate at this frequency. |
| | Clock mode | CHANGE | Default is DRV_SPI_CLOCK_MODE_IDLE_LOW_EDGE_RISE. Change to DRV_SPI_CLOCK_MODE_IDLE_LOW_EDGE_FALL. To match with the SD card SPI mode. |
| | Input Phase | CHANGE | Default is SPI_INPUT_SAMPLING_PHASE_IN_MIDDLE. Change to SPI_INPUT_SAMPLING_PHASE_AT_END. This is to match SD card SPI Phase parammeter. |
| | Max Jobs in Queue | RETAIN | Default is 10. Retain this. |
| | Minimum Number of job queue reserved for Instance | RETAIN | Default is one. Retain this. |