From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32577 invoked by alias); 3 Jul 2009 07:23:49 -0000 Received: (qmail 32559 invoked by uid 22791); 3 Jul 2009 07:23:48 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from kuber.nabble.com (HELO kuber.nabble.com) (216.139.236.158) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 03 Jul 2009 07:23:42 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1MMd7U-000124-Os for ecos-discuss@ecos.sourceware.org; Fri, 03 Jul 2009 00:23:40 -0700 Message-ID: <24318811.post@talk.nabble.com> Date: Fri, 03 Jul 2009 07:23:00 -0000 From: grahamlab To: ecos-discuss@ecos.sourceware.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit References: <24306125.post@talk.nabble.com> <24307911.post@talk.nabble.com> <24318020.post@talk.nabble.com> <24318425.post@talk.nabble.com> X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: RE: [ECOS] Simple serial comms X-SW-Source: 2009-07/txt/msg00014.txt.bz2 > From: grahamlab > > I mean that if I send more that 128 bytes some go missing. > If I set the read to block and then send my bytes the ecos program blocks > until several messages of 128 bytes have been receeived before unblocking > and when it unblocks the message received is corrupted It looks to me like this serial driver uses an interrupt per byte. My guess is one of the following is wrong: 1) you've selected a very high bit rate; 2) you've misconfigured eCos, and the CPU is running at a slow clock rate, or 3) there is some other source of interrupts erroneously keeping the CPU busy. If the answer is 1, and you really need to speed things up, this driver could be rewritten to use DMA. I would recommend using DMA into a buffer large enough to capture, say, 15ms worth of data, and then using the 10ms timer interrupt to transfer data from the DMA buffer to the user buffer. But that would be a complete rewrite. You'd learn quite a bit about the eCos interrupt and device driver structure, but it's nontrivial. I have a standard ecos - I have not changed many settings where is the driver code located? what could be a source of spurious interrupts? -- View this message in context: http://www.nabble.com/Simple-serial-comms-tp24306125p24318811.html Sent from the Sourceware - ecos-discuss mailing list archive at Nabble.com. -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss