I do not see an issue with doing it that way. You can also try to use the 4-pin SPI slave mode as a type of signal to put SOMI in the input direction. const SPIMSP432DMA_HWAttrsV1 spiMSP432DMAHWAttrs[MSP_EXP432P4111_SPICOUNT] = { { .baseAddr = EUSCI_B0_BASE, .bitOrder = EUSCI_B_SPI_MSB_FIRST, .clockSource = EUSCI_B_SPI_CLOCKSOURCE_SMCLK, .defaultTxBufValue = 0xFF, .dmaIntNum = INT_DMA_INT1, .intPriority = (~0), .rxDMAChannelIndex = DMA_CH1_EUSCIB0RX0, .txDMAChannelIndex = DMA_CH0_EUSCIB0TX0, .clkPin = SPIMSP432DMA_P1_5_UCB0CLK, .simoPin = SPIMSP432DMA_P1_6_UCB0SIMO, .somiPin = SPIMSP432DMA_P1_7_UCB0SOMI, .stePin = SPIMSP432DMA_P1_4_UCB0STE, .pinMode = EUSCI_SPI_3PIN, .minDmaTransferSize = 10 }, #define EUSCI_SPI_3PIN EUSCI_B_CTLW0_MODE_0 #define EUSCI_SPI_4PIN_UCxSTE_ACTIVE_HIGH EUSCI_B_CTLW0_MODE_1 #define EUSCI_SPI_4PIN_UCxSTE_ACTIVE_LOW EUSCI_B_CTLW0_MODE_2 See the trm for a more details, ti.com/lit/pdf/slau356 . Section 25.3.4.1 4-Pin Slave Mode 25.3.4.1 4-Pin SPI Slave Mode In 4-pin slave mode, UCxSTE is a digital input used by the slave to enable the transmit and receive operations and is driven by the SPI master. When UCxSTE is in the slave-active state, the slave operates normally. When UCxSTE is in the slave- inactive state: • Any receive operation in progress on UCxSIMO is halted. • UCxSOMI is set to the input direction. • The shift operation is halted until the UCxSTE line transitions into the slave transmit active state. The UCxSTE input signal is not used in 3-pin slave mode. Regards, Chris
↧