TI-RTOS for SimpleLink Wireless MCUs  2.14.03.28
Data Fields
SDSPIEUSCIA_HWAttrsV1 Struct Reference

SDSPIEUSCIA Hardware attributes. More...

#include <SDSPIEUSCIA.h>

Data Fields

uint32_t baseAddr
 
uint8_t clockSource
 
uint8_t portSCK
 
uint32_t pinSCK
 
uint8_t pinSCKModeFunction
 
uint8_t portMISO
 
uint32_t pinMISO
 
uint8_t pinMISOModeFunction
 
uint8_t portMOSI
 
uint32_t pinMOSI
 
uint8_t pinMOSIModeFunction
 
uint8_t portCS
 
uint32_t pinCS
 

Detailed Description

SDSPIEUSCIA Hardware attributes.

The SDSPIEUSCIA configuration structure describes to the SDSPIEUSCIA driver implementation hardware specifies on which SPI peripheral, GPIO Pins and Ports are to be used.

The SDSPIEUSCIA driver uses this information to:

Remarks
To initialize the SD Card into SPI mode, the SDSPI driver changes the SPI's MOSI pin into a GPIO pin so it can kept driven HIGH while the SPI SCK pin can toggle. After the initialization, the TX pin is reverted back to the SPI MOSI mode.

These fields are used by driverlib APIs and therefore must be populated by driverlib macro definitions. For TivaWare these definitions are found in:

An example configuration structure could look as the following:

const SDSPIEUSCIA_HWAttrsV1 sdspiEUSCIAHWAttrs = {
{
.baseAddr = EUSCI_A0_BASE, // SPI Peripheral's base address
.clockSource = EUSCI_A_SPI_CLOCKSOURCE_SMCLK, // Clock source
.portSCK = GPIO_PORT_P2, // SPI SCK PORT
.pinSCK = GPIO_PIN2, // SPI SCK PIN
// SPI SCK PIN Mode
.pinSCKModeFunction = GPIO_SECONDARY_MODULE_FUNCTION,
.portMISO = GPIO_PORT_P1, // SPI MISO PORT
.pinMISO = GPIO_PIN7, // SPI MISO PIN
// SPI MISO PIN Mode
.pinMISOModeFunction = GPIO_SECONDARY_MODULE_FUNCTION,
.portMOSI = GPIO_PORT_P1, // SPI MOSI PORT
.pinMOSI = GPIO_PIN6, // SPI MOSI PIN
// SPI MOSI PIN Mode
.pinMOSIModeFunction = GPIO_SECONDARY_MODULE_FUNCTION,
.portCS = GPIO_PORT_P3, // GPIO Chip select port
.pinCS = GPIO_PIN4, // GPIO Chip select pin
},
};

Field Documentation

uint32_t SDSPIEUSCIA_HWAttrsV1::baseAddr

SPI Peripheral's base address

uint8_t SDSPIEUSCIA_HWAttrsV1::clockSource

SPIUSCI Clock source

uint8_t SDSPIEUSCIA_HWAttrsV1::portSCK

SPI port uses for the SCK, MISO, and MOSI pins

uint32_t SDSPIEUSCIA_HWAttrsV1::pinSCK

SPI SCK pin

uint8_t SDSPIEUSCIA_HWAttrsV1::pinSCKModeFunction

SCK GPIO pin mode selection

uint8_t SDSPIEUSCIA_HWAttrsV1::portMISO

SPI port uses for the SCK, MISO, and MOSI pins

uint32_t SDSPIEUSCIA_HWAttrsV1::pinMISO

SPI MISO pin

uint8_t SDSPIEUSCIA_HWAttrsV1::pinMISOModeFunction

MISO GPIO pin mode selection

uint8_t SDSPIEUSCIA_HWAttrsV1::portMOSI

SPI port uses for the SCK, MISO, and MOSI pins

uint32_t SDSPIEUSCIA_HWAttrsV1::pinMOSI

SPI MOSI pin

uint8_t SDSPIEUSCIA_HWAttrsV1::pinMOSIModeFunction

MOSI GPIO pin mode selection

uint8_t SDSPIEUSCIA_HWAttrsV1::portCS

GPIO Port used for the chip select

uint32_t SDSPIEUSCIA_HWAttrsV1::pinCS

GPIO Pin used for the chip select


The documentation for this struct was generated from the following file:
Copyright 2015, Texas Instruments Incorporated