Hi all,
I'm desperately triying to get my SPI to work on SSI2. Maybe someone has some idea in which trap I run into...
It is configured to run on PortB (GPIO8..10). After initialization the periphery when I send data, the MOSI signal is working fine but the CLK signal is missing!
Here is my initialization function:
void SSI2_Init( void )
{
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);
// Set the pins to be controlled by the SSI controller.
GPIOPinConfigure(GPIO_PB0_SSI2TX);
GPIOPinConfigure(GPIO_PB1_SSI2RX);
GPIOPinConfigure(GPIO_PB2_SSI2CLK);
// CS-EPCS_FLASH
GPIOPinTypeGPIOOutput(GPIO_PORTB_BASE, GPIO_PIN_3);
GPIOPinWrite(GPIO_PORTB_BASE, GPIO_PIN_3, 0xFF);
// CS-EEPROM
GPIOPinTypeGPIOOutput(GPIO_PORTA_BASE, GPIO_PIN_6);
GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_6, 0xFF);
// CS-RTC
GPIOPinTypeGPIOOutput(GPIO_PORTA_BASE, GPIO_PIN_4);
GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_4, 0xFF);
// Enable SSI peripheral
SysCtlPeripheralEnable(SYSCTL_PERIPH_SSI2);
SysCtlPeripheralReset(SYSCTL_PERIPH_SSI2);
GPIOPinTypeSSI(GPIO_PORTB_BASE, GPIO_PIN_2 | GPIO_PIN_1 | GPIO_PIN_0);
SSIConfigSetExpClk(SSI2_BASE, SysCtlClockGet(SYSTEM_CLOCK_SPEED),
SSI_FRF_MOTO_MODE_0,
SSI_MODE_MASTER, USER_BITRATE, 8);
IntEnable(INT_SSI2);
SSIIntEnable(SSI2_BASE, SSI_RXFF|SSI_RXTO);
SSIEnable(SSI2_BASE);
}
Best regards,
Stefan