From: bugzilla-daemon@bugs.ecos.sourceware.org
To: ecos-patches@ecos.sourceware.org
Subject: [Bug 1001024] STM32 USB driver and proposed USB API change
Date: Sun, 17 Oct 2010 15:06:00 -0000 [thread overview]
Message-ID: <20101017150640.B3FD62F78011@mail.ecoscentric.com> (raw)
In-Reply-To: <bug-1001024-104@http.bugs.ecos.sourceware.org/>
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 <chris@zynaptic.com> 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 <cyg/hal/hal_arch.h> // CYGNUM_HAL_STACK_SIZE_TYPICAL
#include <cyg/infra/cyg_type.h>
#include <cyg/infra/cyg_ass.h>
#include <cyg/infra/diag.h>
#include <cyg/kernel/kapi.h>
#include <cyg/io/usb/usbs_serial.h>
//-----------------------------------------------------------------------------
// 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.
next prev parent reply other threads:[~2010-10-17 15:06 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-1001024-104@http.bugs.ecos.sourceware.org/>
2010-08-26 9:14 ` bugzilla-daemon
2010-08-26 11:00 ` bugzilla-daemon
2010-09-03 14:00 ` bugzilla-daemon
2010-09-13 19:31 ` bugzilla-daemon
2010-09-13 19:32 ` bugzilla-daemon
2010-09-13 19:51 ` bugzilla-daemon
2010-09-17 13:11 ` bugzilla-daemon
2010-09-17 18:03 ` bugzilla-daemon
2010-10-07 10:13 ` bugzilla-daemon
2010-10-07 19:23 ` bugzilla-daemon
2010-10-09 14:38 ` bugzilla-daemon
2010-10-15 13:51 ` bugzilla-daemon
2010-10-15 16:13 ` bugzilla-daemon
2010-10-15 17:07 ` bugzilla-daemon
2010-10-15 20:52 ` bugzilla-daemon
2010-10-16 7:41 ` bugzilla-daemon
2010-10-16 10:12 ` bugzilla-daemon
2010-10-16 10:55 ` bugzilla-daemon
2010-10-16 12:18 ` bugzilla-daemon
2010-10-16 13:53 ` bugzilla-daemon
2010-10-16 14:34 ` bugzilla-daemon
2010-10-16 19:30 ` bugzilla-daemon
2010-10-17 14:21 ` bugzilla-daemon
2010-10-17 15:06 ` bugzilla-daemon [this message]
2010-10-17 15:29 ` bugzilla-daemon
2010-10-17 18:08 ` bugzilla-daemon
2010-10-17 18:34 ` bugzilla-daemon
2010-10-18 9:36 ` bugzilla-daemon
2010-10-20 18:27 ` bugzilla-daemon
2010-10-21 8:57 ` bugzilla-daemon
2010-10-21 15:40 ` bugzilla-daemon
2010-10-21 18:32 ` bugzilla-daemon
2010-10-21 18:47 ` bugzilla-daemon
2010-10-21 21:20 ` bugzilla-daemon
2010-10-25 8:48 ` bugzilla-daemon
2010-10-26 10:50 ` bugzilla-daemon
2010-10-26 19:15 ` bugzilla-daemon
2010-10-27 10:25 ` bugzilla-daemon
2010-10-27 13:04 ` bugzilla-daemon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101017150640.B3FD62F78011@mail.ecoscentric.com \
--to=bugzilla-daemon@bugs.ecos.sourceware.org \
--cc=ecos-patches@ecos.sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).