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 ?