This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C1297NCZAD: SPI communication issue

Part Number: TM4C1297NCZAD


Dear all,

Even if this post is related to TM4C the corresponding forum is not selectable. When choosing part starting with TM4C (doesn't matter which one), TM4C forum is removed from the list and LPW forums are presented.

please help with the following issue:
A third party module is used as SPI master.

Module Configuration: Mode: command word length is 1, data width is 8bit, mode 0 (rising edge trigger, active low), clock frequency 3M.
Transmit data waveform: Send data 1,0,0,0

This is connected to TM4C129x device configured as slave. The clock is configured as following:

ui32SysClock = SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ | SYSCTL_OSC_MAIN | SYSCTL_USE_PLL | SYSCTL_CFG_VCO_480), 120000000)

Calcluation: SSInClk = SysClk / (CPSDVSR * (1 + SCR)) = 120M / (2 * (1 + 19)) = 120M / 40 = 3M

Afterwards the SSI is initialized:

SysCtlPeripheralEnable(SYSCTL_PERIPH_SSI0);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);

GPIOPinConfigure(GPIO_PA2_SSI0CLK);
GPIOPinConfigure(GPIO_PA3_SSI0FSS);
GPIOPinConfigure(GPIO_PA4_SSI0XDAT0);
GPIOPinConfigure(GPIO_PA5_SSI0XDAT1);

GPIOPinTypeSSI(GPIO_PORTA_BASE, GPIO_PIN_5 | GPIO_PIN_4 | GPIO_PIN_3 | GPIO_PIN_2);
SSIConfigSetExpClk(SSI0_BASE, ui32SysClock, SSI_FRF_MOTO_MODE_0, SSI_MODE_SLAVE, 3000000, 8);

SSIEnable(SSI0_BASE);

 The SSI is polled with 

SSIDataGet(SSI0_BASE, &data);

No data is received. 

Can you help here?

  • Sorry about the forum choice. That issue should be fixed now.

    According to your diagram above, you have the TX and RX pins reversed. In legacy mode PA5 is receive and PA4 is TX even in slave mode. Some devices change the direction of the pins when switching between master and slave mode, the TM4C processors do not.