2011-05-26 00:56:42     problem with serial port

Document created by Aaronwu Employee on Aug 27, 2013Last modified by Aaronwu Employee on Aug 27, 2013
Version 2Show Document
  • View in full screen mode

2011-05-26 00:56:42     problem with serial port

Amitvikram M (INDIA)

Message: 100843   

 

I have problem with serial port response time. My requirement is as soon as I recieve the data from serial data, I have to send the response through serial port within 2 ms. But whereas am getting timing of 20 ms. To test the response I am doin the following:

 

while(1) {

    read(DeviceID,strx,1);

    write(DeviceID,strx,1);

}

 

I monitored the RX and TX lines of UART on CRO. The time gap between between reception and transmission is 20 ms!!!. How do I improve this timing?

 

Thanks in advance.

QuoteReplyEditDelete

 

 

2011-05-26 00:58:53     Re: problem with serial port

Mike Frysinger (UNITED STATES)

Message: 100844   

 

please run `make bugreport` and post the tarball as an attachment

QuoteReplyEditDelete

 

 

2011-05-26 03:53:43     Re: problem with serial port

Amitvikram M (INDIA)

Message: 100861   

 

Thanks for the reply. Attached is the bugreport.

 

bugreport.tar.gz

QuoteReplyEditDelete

 

 

2011-05-26 11:32:21     Re: problem with serial port

Mike Frysinger (UNITED STATES)

Message: 100872   

 

you're running the Blackfin serial in DMA mode.  that greatly improves throughput, but increases latency a bit.  try using PIO mode instead.

QuoteReplyEditDelete

 

 

2011-05-27 01:10:54     Re: problem with serial port

Amitvikram M (INDIA)

Message: 100878   

 

Thanks a ton Mike!!!! Timing improved and now it is less than 1 ms.

QuoteReplyEditDelete

Attachments

Outcomes