From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32259 invoked by alias); 17 Oct 2010 15:06:49 -0000 Received: (qmail 32198 invoked by uid 22791); 17 Oct 2010 15:06:48 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from hagrid.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.197) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 17 Oct 2010 15:06:44 +0000 Received: from localhost (hagrid.ecoscentric.com [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id 5A8C42F8000B for ; Sun, 17 Oct 2010 16:06:42 +0100 (BST) Received: from mail.ecoscentric.com ([127.0.0.1]) by localhost (hagrid.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Gyg2ltdgQAHr; Sun, 17 Oct 2010 16:06:40 +0100 (BST) From: bugzilla-daemon@bugs.ecos.sourceware.org To: ecos-patches@ecos.sourceware.org Subject: [Bug 1001024] STM32 USB driver and proposed USB API change X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: eCos X-Bugzilla-Component: Patches and contributions X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: chris@zynaptic.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: low X-Bugzilla-Assigned-To: john@dallaway.org.uk X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: In-Reply-To: References: X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Sun, 17 Oct 2010 15:06:00 -0000 Message-Id: <20101017150640.B3FD62F78011@mail.ecoscentric.com> Mailing-List: contact ecos-patches-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-patches-owner@ecos.sourceware.org X-SW-Source: 2010-10/txt/msg00016.txt.bz2 Please do not reply to this email. Use the web interface provided at: http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001024 --- Comment #24 from Chris Holgate 2010-10-17 16:06:37 BST --- (In reply to comment #23) > Chris, thank you for the double buffering fix. I am now able to receive all > characters sent from minicom, but the application locks up after a few > characters have been received (not always the same number of chars). The same > problem occurs with the "usbserial_echo" test in the USB serial function > package. I definitely have variable length bulk transfers disabled and the > usbserial_echo test uses a 4096 byte buffer. I've not been able to replicate that here. Loopback to minicom using the method you've previously described seems to work fine for me (for a few hundred characters at least). I couldn't get my Linux machine to correctly recognize the eCos serial loopback until I ditched my FTDI based USB/serial adapter for the Redboot connection - but once I reverted to a 'proper' serial port for Redboot things have been fine. The test code I used is the absolute minimum I could get away with (see below)... #include // CYGNUM_HAL_STACK_SIZE_TYPICAL #include #include #include #include #include //----------------------------------------------------------------------------- // Thread primitives used for eCos application startup. static cyg_uint8 stack [CYGNUM_HAL_STACK_SIZE_TYPICAL] __attribute__((aligned(8))); static cyg_thread thread_data; static cyg_handle_t thread_handle; //----------------------------------------------------------------------------- // Main thread entry point. extern "C" void mainThreadStartup (void) { int rxBytes, txBytes, i; char rxBuf[256]; // Set up the USB serial interface. diag_printf("Setting up the USB serial interface.\n"); usbs_serial_start(); while(1) { rxBytes = usbs_serial_rx(&usbs_ser0, rxBuf, 256); for (i = 0; i < rxBytes; i++) diag_printf("%c", rxBuf[i]); txBytes = usbs_serial_tx(&usbs_ser0, rxBuf, rxBytes); } } //----------------------------------------------------------------------------- // Startup function called in the context of the eCos idle thread once all the // system startup is complete. extern "C" void cyg_user_start (void) { cyg_thread_create( 10, // Arbitrary priority (cyg_thread_entry_t*) mainThreadStartup, // Thread entry point 0, // (char*) "app_thread", // Thread name &stack[0], // Stack CYGNUM_HAL_STACK_SIZE_TYPICAL, // Stack size &thread_handle, // Thread handle &thread_data // Thread data structure ); cyg_thread_resume(thread_handle); cyg_scheduler_start(); } //----------------------------------------------------------------------------- -- Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.