Page 1 of 1

Inter chaarcter delay interducing by Board on serial comm

Posted: Wed May 06, 2015 2:06 pm
by rambabu0640
For my application, Board configured on 375000 baudrate. I'm using linux given along with SAMA5D3 board. My board is slave deviceon bus.
When master sends command, board should respond with in 375micro sec.
Board is responding with 73 characters of packet. 

Here my issue is sometimes Board interducing ~150micro secs delay between two bytes. As per master allowable delay between char is 3-Char length(i.e 88 microsec). Due to this my master is detecting as wrong packet and reporting error.
This inter char delay has been observed by scoping logic analyzer.

I'm thinking that issue is because of process switching by linux scheduler during packet send.

Can any one help me on this.   

Re: Inter chaarcter delay interducing by Board on serial com

Posted: Thu May 07, 2015 8:31 pm
by blue_z
rambabu0640 wrote:I'm thinking that issue is because of process switching by linux scheduler during packet send.
Wrong thinking.
Process suspension would be in the order of tens of milliseconds rather than microseconds.
Data submitted by the write() syscall would be output by the device driver using interrupts or DMA, neither of which are subject to process scheduling.

An occasional 150 microsecond interval seems likely to be ISR latency issue while using PIO.
Try studying discussions/viewtopic.php/f,33/t,23902.html

Regards