From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1NrAx5-0006zI-Dt for garchives@archives.gentoo.org; Mon, 15 Mar 2010 14:07:27 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0D773E087B for ; Mon, 15 Mar 2010 14:07:27 +0000 (UTC) Received: from b.painless.aaisp.net.uk (b.painless.aaisp.net.uk [81.187.30.52]) by pigeon.gentoo.org (Postfix) with ESMTP id 78DEFE06D7 for ; Mon, 15 Mar 2010 13:34:38 +0000 (UTC) Received: from home.pinkhut.co.uk ([81.187.28.34] helo=vader.localdomain) by b.painless.aaisp.net.uk with esmtp (Exim 4.69) (envelope-from ) id 1NrARJ-0002Qg-2M for gentoo-embedded@lists.gentoo.org; Mon, 15 Mar 2010 13:34:37 +0000 Received: by vader.localdomain (Postfix, from userid 1000) id C6DAC1080DE; Mon, 15 Mar 2010 13:34:34 +0000 (GMT) Date: Mon, 15 Mar 2010 13:34:34 +0000 From: Bob Dunlop To: gentoo-embedded@lists.gentoo.org Subject: Re: [gentoo-embedded] High Speed Serial Problem Message-ID: <20100315133434.GA15613@xyzzy.org.uk> Mail-Followup-To: gentoo-embedded@lists.gentoo.org References: <20100314102459.20d7883b@osage.osagesoftware.com> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-embedded@lists.gentoo.org Reply-to: gentoo-embedded@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100314102459.20d7883b@osage.osagesoftware.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-Archives-Salt: cd5802fd-ea3e-4fb7-98f3-08dfb36312ba X-Archives-Hash: 627cf11d2ea45bdedea0e32d7626b324 Hi, > The Linux app has a separate thread for each of the 2 serial ports. > Data is received using select() and read(). Read is called with a 32 > byte buffer. As neither BRKINT nor IGNBRK is set, the input thread > recognizes 0xFF, 0x00, 0x00 sequences as breaks. When the encoded > break is recognized, any pending message is sent. There should be no problem handling 115K2 data at full speed on a 300MHz processor although some SOC UARTs are realy gnarly. Using line break as a protocol signalling element is so 1970s but again shouldn't be a problem. What are your VMIN, VTIME settings ? They can have a big impact on read performance/timing. VMIN=VTIME=0 makes a mockery of using select for example. What size of return are you actually seeing from the read ? If you are seeing reasonably full blocks, does you code handle the three char break sequence spanning the read boundy ? Sorry if this is teaching grandma to suck eggs. -- Bob Dunlop