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.

BIOSPSP SPI stream_write problem

Other Parts Discussed in Thread: OMAPL138

Hi,

 

I am using BISOPSP and  OMAPL138.

OMAPL138 is in master mode. It transfer data to slave which works perfect.

When i want to read data from slave. I just write data to slave to get data from slave FIFO. I check with oscilloscope(Slave transfer data perfectly) .But master OMAP always receive FF . I have two task.Task one transmit data. Task two wait for GPIO interrupt from slave.Interrupt occur perfectly. When interrupt occur ,task 2 read the data ..to read the data , code is below...  i initialize spi handle only in my task1.

i put my receive code here.. May be some one give suggestion....

 

    dataparam.bufLen       = SPI_MAX_CMD_LEN;

    //Pointer to the buffer to hold the input data.
    dataparam.inBuffer     = &loopRead[0];

    //Pointer to the output buffer specified by the application
    dataparam.outBuffer    = &loopWrite[0];

     //Flags to indicate the current operatio

     dataparam.flags      = Spi_CSHOLD;

    //The data format to be used by the SPI
    dataparam.dataFormat   = Spi_DataFormat_0;

    dataparam.chipSelect = 0x40u;   
    size = dataparam.bufLen;

    /* write data to FLASH */
   
   
    Stream_write(spiHandle, &dataparam, size, BIOS_WAIT_FOREVER, &eb);

so it should write data and read the data...Why read data always FF ?

  • Sam,

    Here are the few more information i need,

    1. Which BIOS PSP version are you using?

    2. Are you using OMAPL138 EVM or the custom board? if it is the custom board which slave device are you using?

    3. Could you please mention the tool versions being used?

    4. If you are using the BIOS PSP, then have you tried with the spi example which comes with the PSP?

     Thanks and Regards,

    Sandeep K

  •  

    1. Which BIOS PSP version are you using?

     

    I am using bisopsp driver 02_10_01

    2. Are you using OMAPL138 EVM or the custom board? if it is the custom board which slave device are you using?

    yes omap evm...slave is stellaris MCU...

    3. Could you please mention the tool versions being used?

    CCS 4.2.3.0004

     

    4. If you are using the BIOS PSP, then have you tried with the spi example which comes with the PSP?

    yes...I follow the same intstruction.

    Some more debug . at  OMAP side, SOMI read 0xFF only (If you also remove the connction ) so i think, it s not reading the data ... and i check the pinmux register,it s perfectly configure. i checked slave TX pin, it transmits the data.I also checked RXBUF at OMPA,it s empty only .

     

    So i need to figure out why SOMI at OMAP is always read FF.

  • Sam,

    Have you checked whether the data is properly sent from the slave device or not? Is it possible to probe the Tx data at slave (which is Rx for the Master)?

    Thanks and Regards,

    Sandeep K