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

SDSPIMSP432 Hardware attributes. More...

#include <SDSPIMSP432.h>

Data Fields

uint32_t baseAddr
 
uint8_t clockSource
 
uint8_t portSCK
 
uint16_t pinSCK
 
uint8_t sckMode
 
uint8_t portMISO
 
uint16_t pinMISO
 
uint8_t misoMode
 
uint8_t portMOSI
 
uint16_t pinMOSI
 
uint8_t mosiMode
 
uint8_t portCS
 
uint16_t pinCS
 

Detailed Description

SDSPIMSP432 Hardware attributes.

The SDSPIMSP432 HWAttrs configuration structure contains SPI peripheral and GPIO Pin details required by the SDSPIMSP432 driver implementation.

The SDSPIMSP432 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 SDSPIMSP432_HWAttrs sdspiMSP432HWAttrs[MSP_EXP432P401R_SDSPICOUNT] = {
{
.baseAddr = EUSCI_B0_BASE,
.clockSource = EUSCI_B_SPI_CLOCKSOURCE_SMCLK,
// CLK, MOSI & MISO ports & pins
.portSCK = GPIO_PORT_P1,
.pinSCK = GPIO_PIN5,
.portMISO = GPIO_PORT_P1,
.pinMISO = GPIO_PIN7,
.portMOSI = GPIO_PORT_P1,
.pinMOSI = GPIO_PIN6,
// Chip select port & pin
.portCS = GPIO_PORT_P4,
.pinCS = GPIO_PIN6
}
};

Field Documentation

uint32_t SDSPIMSP432_HWAttrs::baseAddr

SPI Peripheral's base address

uint8_t SDSPIMSP432_HWAttrs::clockSource

SPIUSCI Clock source

uint8_t SDSPIMSP432_HWAttrs::portSCK

SPI port for the SCK pin

uint16_t SDSPIMSP432_HWAttrs::pinSCK

SPI SCK pin

uint8_t SDSPIMSP432_HWAttrs::sckMode

GPIO mode to enable SCK pin

uint8_t SDSPIMSP432_HWAttrs::portMISO

SPI port for the MISO pin

uint16_t SDSPIMSP432_HWAttrs::pinMISO

SPI MISO pin

uint8_t SDSPIMSP432_HWAttrs::misoMode

GPIO mode to enable MISO pin

uint8_t SDSPIMSP432_HWAttrs::portMOSI

SPI port for the MOSI pin

uint16_t SDSPIMSP432_HWAttrs::pinMOSI

SPI MOSI pin

uint8_t SDSPIMSP432_HWAttrs::mosiMode

GPIO mode to enable MOSI pin

uint8_t SDSPIMSP432_HWAttrs::portCS

GPIO Port used for the chip select

uint16_t SDSPIMSP432_HWAttrs::pinCS

GPIO Pin used for the chip select


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