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.

Missing data with stream_write

Other Parts Discussed in Thread: OMAPL138

Hi,
I am using bios 6_21_03_21, xdctools 3_16_03_36, CG tools 6.1.20, ipc 1_20_00_23, psp 02_10_01, edma3_lld 2_10_02_03 and OMAPL138 custom board.

OMAP is connected to another processor via SPI1, OMAP is master and 1kB Data is exchanged using spi stream_write. When we do this repeatedly, some times all 1kB data is not received by the slave processor. With test data, when we do this for 1000 times, 20 to 30 times received 1kB has lost 1 or 2 bytes.

Is there any known issue with stream_write or the CCS packages that I am using? Anyone faced this problem?

thanks, Durga

  • Hi Durga,

    Do you have the common ground connected between the two boards?. Also, what is the "outputClkFreq" set to?..

    Best Regards,

    Raghavendra

  • Hi Raghavendra,
    Both the processors have same ground. outputClkFreq is set to 30MHZ. I have reduced this clock to 1MHz and issue still exists.

    thanks, Durga

  • Hi Durga,

    durga temp said:
    Is there any known issue with stream_write or the CCS packages that I am using?

    As far as I know, there are NO known issues as such related to stream_write or the CCS packages. Still, you can refer the "Known issues" section of the Release Notes(OMAPL138_BIOSPSP_ReleaseNotes.pdf) placed in the top level docs folder of the pspdrivers package.

    In which mode is the SPI configured(Interrupt/DMA)?. If you are exchanging 1kB of data 1000 times, approx how much time would it take to complete?. Have you probed to check the clock (just to make sure there are no distortions)?. At instances/iterations when you lose 1 or 2 bytes, have you checked in what state the SPI is in?(SPI registers) - Checked for any errors?

    Let me know..

    Best Regards,

    Raghavendra

  • Hi Raghavendra,

    SPI is configured in DMA mode. Time taken for 1kB transfer is appx 2msec.
    I probed the SPI clock and I did not see any distortions.

    Checked the SPI registers when data is missing and I dont see any errors (I have checked once stream_write for 1kB is completed).

    I am using stream_write with length set to 1024 bytes.
    It is mentioned in one of BIOS posts that edma will be configured for 128 bytes internally, even though stream length is set to 1024.
    Could it be a problem?

    Also this issue happens randomly, some times after 300 times, some times after 1000 times etc.,

    thanks, Durga

  • Hi Durga,

    durga temp said:
    It is mentioned in one of BIOS posts that edma will be configured for 128 bytes internally, even though stream length is set to 1024. 

    Could it be a problem?

    No, this not true. Actually, the SPI driver maintains an internal buffer of 128 bytes. If the user wishes to have a buffer size greater than 128 bytes, then the user has to provide buffers from the application.

    Best Regards,

    Raghavendra