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 | | RETAIN | Default is Disabled. Retain this. |
| 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 1 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 node | | 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 DMA for SPI transfers. |
| Number of SPI Driver Instances | | RETAIN | Default is 1. 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 1. 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 numbr 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 | RETAIN | Default is INT_PRIORIY_LEVEL1. Retain this. |
| | TX Interuupt Sub-Priority | RETAIN | Default is INT_SUBPRIORITY_LEVEL_0. Retain this. |
| | RX Interrupt Priority | RETAIN | Default is INT_PRIORIY_LEVEL1. Retain this. |
| | RX Interrupt Sub-Priority | RETAIN | Default is INT_SUBPRIORITY_LEVEL_0. Retain this. |
| | Error Interrupt Priority | RETAIN | Default is INT_PRIORIY_LEVEL1. Retain this. |
| | 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 | RETAIN | Default is Enhanced Mode. Retain this. |
| | Allow Idle Run | RETAIN | Disabled by default. Retain this. |
| | 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 1. Retain this. |