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.

SSI Slave Receives only 0x00

Hello,

I have a board with 2 processors:

1. F28M3552C1 (Concerto) as SSI Master.

2. LM4F232 as SSI Slave.

8 bit mode 400000 bitrate.

I am sending bytes from the master to the slave, and also on each slave receive it sends back a byte.

in slave RXFF interrupt I receive the data with SSIDataGet,

But all I get is always 0x00, What can be the problem ?

When I send a byte back from the slave to master, the master get this byte successfully.

I look at the data in oscilloscope and it looks good (not 0x00).

Any Idea ?

  • Nir Blinder said:
    in slave RXFF interrupt I receive the data with SSIDataGet,

    But all I get is always 0x00, What can be the problem ?

    Is the SSIRx pin on the LM4F232 SSI slave correctly configured for use in SSI Rx mode?

    E.g. SSI1Rx is on pin PF0. PF0 defaults to NMI and requires a special "unlock" procedure to be configured for a different use.

  • Thanks for the answer , I think it is the right direction though I didn't get it to work yet,

    this is my code:

                  SysCtlPeripheralEnable(SYSCTL_PERIPH_SSI1);
                  SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF);

                  GPIOPinTypeSSI(GPIO_PORTF_BASE, GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3);
                 
                  GPIOPinConfigure(GPIO_PF0_SSI1RX);
                  GPIOPinConfigure(GPIO_PF1_SSI1TX);
                  GPIOPinConfigure(GPIO_PF2_SSI1CLK);
                  GPIOPinConfigure(GPIO_PF3_SSI1FSS);
                  
                  SysCtlPeripheralReset(SYSCTL_PERIPH_SSI1);   
                  SSIDisable(SSI1_BASE);
                  SSIConfigSetExpClk(SSI1_BASE,SysCtlClockGet(),SSI_FRF_MOTO_MODE_0, SSI_MODE_SLAVE, 400000, 8);
                  SSIEnable(SSI1_BASE);
                  SSIIntEnable(SSI1_BASE, SSI_RXFF | SSI_RXTO);
                  //SSIIntEnable(SSI1_BASE, SSI_RXFF);
                  IntEnable(INT_SSI1);

    I think the unlocking procedure for PF0 has to be something like that no ?

                  HWREG(GPIO_PORTF_BASE + GPIO_O_LOCK) = GPIO_LOCK_KEY_DD;
                  HWREG(GPIO_PORTF_BASE + GPIO_O_CR) = 0xFF;
                  GPIOPinConfigure(GPIO_PF0_SSI1RX);
                  HWREG(GPIO_PORTF_BASE + GPIO_O_CR) = 0xFE;
                  HWREG(GPIO_PORTF_BASE + GPIO_O_LOCK) = GPIO_LOCK_M;

    Am I wrong ?

  • Yes !!! it works, just had to put those lines beforethis line:

    GPIOPinTypeSSI(GPIO_PORTF_BASE, GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3);

    Thank you very much for the help !!!