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.

Concerto SPI2 interface problem

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
  • Problem solved recently. It was a bit tricky, the other master (FPGA) was kept in a config-mode but did not give me control over all SPI signals, missed an remark in the user guide of the FPGA.

    Another thing which I run into while searching for the problem: When I read some registers (e.g. GPIODATA or SSISR) I don't get the value I expect. I have to read the content to an variable. Just to take care of when you are debugging...

    Stefan