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.

C6748 LCDK SPI SLAVE PROBLEM

Hi,

We are interfacing an ADS1278EVM to the lcdkc6748 using J16 Camera SPI1 port. We are also using C6748_StarterWare_1_20_03_03 platform. Our clock signal(sampling clock-4MHz) wich is the same serial clock signal (SPI1_CLK) comes from a signal generator, we are also using a GPIO port to sensing the DRDY signal from conversor for commnication starts. 

I want to configure the C6748lck as slave mode but I do not have any data. The conversor has a 24 bit resolution So I want to receive two 12 bits streams between samples. I only enable one channel.

 Please could you have a look into my code and write where is the mistake? I can not see where the mistake is.

RENUEVE:
         while(1){
              c= GPIOPinRead(SOC_GPIO_0_REGS, 81);
              if (c==GPIO_PIN_LOW) {
             z=0;
                    delay(0);
                    goto RECEPCION;
                 }
                 c= GPIOPinRead(SOC_GPIO_0_REGS, 81);
       }
       RECEPCION:
         for(y=z;y<(z+2);y++){
             SPITransmitData1(SOC_SPI_1_REGS, 0xFFF);
             d= SPIReceiveFlag(SOC_SPI_1_REGS);
             if(!d)
                    Recepcion_dato[y]=SPIDataReceive(SOC_SPI_1_REGS);
                    SPIIntStatusClear(SOC_SPI_1_REGS, SPI_RECV_INT);
             //else
                    //Contar_error=Contar_error+1;
             }
              z=y;
              SPIDisable(SOC_SPI_1_REGS);
       goto RENUEVE;
 
 
void ConfigurarSPI(){
  unsigned int  val = 0x0E04;
 
SPIModeConfigure(SOC_SPI_1_REGS, SPI_SLAVE_MODE);//Define que la tarjeta LCDK sera Esclavo (bit CLKMOD y MASTER)
SPIPinControl(SOC_SPI_1_REGS, 0, 0, &val);//Define que el DSP sera esclavo en configuracion de tres pines
SPIDat1Config(SOC_SPI_1_REGS, SPI_DATA_FORMAT0, 0x0);
//SPIClkConfigure(SOC_SPI_1_REGS, 150000000, 4000000, SPI_DATA_FORMAT0);
SPICharLengthSet(SOC_SPI_1_REGS, 0xC, SPI_DATA_FORMAT0);
SPIShiftMsbFirst(SOC_SPI_1_REGS, SPI_DATA_FORMAT0);
SPIConfigClkFormat(SOC_SPI_1_REGS,(SPI_CLK_POL_LOW|SPI_CLK_INPHASE),SPI_DATA_FORMAT0);
 
       }