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.

OMAP-l138 lcdk : sporadic long-lasting RingIO calls

Hi everyone,

I'm using syslink_2_21_03_11 to pass data between ARM and DSP. For this I have the following code on ARM side :

writeData( void* pBuffer, size_t size )
{
   RDM_Error_t ret = RDM_OK;
   unsigned char* tmpData = 0;
   unsigned int ackSize = 1341;
   Int status = 0;

   gettimeofday(&startTime, NULL);

   // acquire a buffer from the RingIO
   status = RingIO_acquire(this->m_Module.rio_WriterHandle,
         (RingIO_BufPtr*)&tmpData, &ackSize);

   if ( status != RingIO_S_SUCCESS ) {
      ret = RDM_INTERNAL_ERROR;
   } else {
      memcpy( tmpData, pBuffer, ackSize );

      // release acquired buffer
      status = RingIO_release( this->m_Module.rio_WriterHandle, ackSize);
      if( status < 0 ) {
         ret = RDM_INTERNAL_ERROR;
      }
      else
      {

         gettimeofday(&endTime, NULL);
         printf("\n!!Elapsed time for ringIO TX: %d\n", endTime.tv_usec - startTime.tv_usec);
      }
   }

   return ret;
}

From time to time I see that the elapsed time in my test is more than 10ms..sometimes even 30 ms. But most time it is about 0.1-0.3 ms which is what expected actually. What could be the reason for such a strange behaviour ?

  • Hi,
    Use "gettimeofday" between each function (RingIO_acquire, memcpy, RingIO_release) and see which function cause this behavior.
  • Hi Titusrathinaraj

    I see that it comes from "acquire" call. I have 2 threads in my arm application which use 2 different instances of RingIO objects. I see that if there is no data to be read and acquire is failed the overall execution time becomes very big. And also there is a side effect on another RingIO instance.

    From the syslink sources I see that syslink driver utilizes one IRQ line : could it be the reason for not accessing the RingIO instances at the same time from different threads?

    Also I saw in one spec that there are 2 notify lines between arm and dsp. How can I enable it? Should it give any performance improvements?

    BR,

    Dmitry