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.

TM4C1294NCPDT: TM4C1294NCPDT

Part Number: TM4C1294NCPDT
Other Parts Discussed in Thread: EK-TM4C1294XL

Hi Folks,

I develop a system, that consist of two embedded boards, connected together via SPI. The data transfer happens only master -> slave.

Master: EK-TM4C1294XL launchpad

Slave: TM4C123AH6P based custom board

I can only use the CCS' debugger to see what is going on, but I see, that data frames are received and read out by the slave from its buffer, but every time the data is ZERO.

Can anybody suggest me, what did I wrong, where should I found the solution, etc...

The related code of the Master

// Initialize the SPI1 related GPIOs
MAP_GPIOPinConfigure(GPIO_PB4_SSI1FSS);
MAP_GPIOPinConfigure(GPIO_PB5_SSI1CLK);
MAP_GPIOPinTypeSSI(GPIO_PORTB_BASE, GPIO_PIN_4 | GPIO_PIN_5);
MAP_GPIOPadConfigSet(GPIO_PORTB_BASE, GPIO_PIN_4 | GPIO_PIN_5, GPIO_STRENGTH_8MA, GPIO_PIN_TYPE_STD_WPU);
MAP_GPIOPinConfigure(GPIO_PE4_SSI1XDAT0);
MAP_GPIOPinConfigure(GPIO_PE5_SSI1XDAT1);
MAP_GPIOPinTypeSSI(GPIO_PORTE_BASE, GPIO_PIN_4 | GPIO_PIN_5);
MAP_GPIOPadConfigSet(GPIO_PORTE_BASE, GPIO_PIN_4 | GPIO_PIN_5, GPIO_STRENGTH_8MA, GPIO_PIN_TYPE_STD_WPU);

// Initialize the SPI1
MAP_SSIConfigSetExpClk(SSI1_BASE, 120000000, SSI_FRF_MOTO_MODE_0, SSI_MODE_MASTER, 500000,16);
MAP_SSIEnable(SSI1_BASE);

// Sending data
for (uint32_t index = 0; index < _dataOut.size(); ++index) {
	MAP_SSIDataPut(SSI1_BASE, _dataOut[index]);
}

The related code of the Slave

// Initialize the SSI1 related GPIO
ROM_GPIOPinConfigure(GPIO_PF0_SSI1RX);
ROM_GPIOPinConfigure(GPIO_PF1_SSI1TX);
ROM_GPIOPinConfigure(GPIO_PF2_SSI1CLK);
ROM_GPIOPinConfigure(GPIO_PF3_SSI1FSS);
ROM_GPIOPinTypeSSI(GPIO_PORTF_BASE, GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3);
ROM_GPIOPadConfigSet(GPIO_PORTF_BASE, GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3, GPIO_STRENGTH_4MA, GPIO_PIN_TYPE_STD_WPU);

// Initialize the SSI1
ROM_SSIConfigSetExpClk(SSI1_BASE, ROM_SysCtlClockGet(), SSI_FRF_MOTO_MODE_0, SSI_MODE_SLAVE, 500000, 16);
ROM_SSIEnable(SSI1_BASE);


// Reading from the buffer
uint32_t data = 0;
ROM_SSIDataGet(SSI1_BASE, &data);

ROM_GPIOPinWrite(GPIO_PORTA_BASE, 0xFF, static_cast<uint8_t>(data));
ROM_GPIOPinWrite(GPIO_PORTB_BASE, 0xFF, static_cast<uint8_t>(data >> 8));

Can anybody help me?

Regards,

Norbert