Hello, I want to use SPI communication to communicate between TM4C129XNCZAD and two other devices. I am having trouble understanding how to configure the SSI Module to achieve this. Here is the code I have and the PIN map for the SPI connections.
//enable the pins used for SPI communication. SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOQ); GPIOPinConfigure(GPIO_PQ0_SSI3CLK); GPIOPinConfigure(GPIO_PQ1_SSI3FSS); GPIOPinConfigure(GPIO_PQ2_SSI3XDAT0); GPIOPinTypeSSI(PQ_SPI_PORT, ( PQ0_SPI_CLK_PIN | PQ1_SPI_SS_MEMORY_PIN | PQ2_SPI_TX_PIN )); // // Enable the SSI0 peripheral // SysCtlPeripheralEnable(SYSCTL_PERIPH_SSI3); // Wait for the SSI0 module to be ready. // while(!SysCtlPeripheralReady(SYSCTL_PERIPH_SSI3)) { } // // Configure the SSI. // SSIConfigSetExpClk(SSI3_BASE, SysCtlClockFreqSet((SYSCTL_OSC_INT | SYSCTL_USE_OSC), 50000000), SSI_FRF_MOTO_MODE_0, SSI_MODE_MASTER, 2000000, 8); // //Enable the SSI module // SSIEnable(SSI3_BASE);
Digital Potentiometer (Digi Pot) and Digital to Analog Converter (DAC) are the two devices I want to communicate with and I was assuming I need to just configure two SSI<n> but I am not sure how to do this considering both of them are on the same PORT. Can someone give me an example or some help on how to configure SSI peripheral to Communicate with these two devices as slaves and TM4C as master?