Alexandre Souza wrote:
I have a small
uC device that I made that uses an FTDI USB->TTL
converter. I wish USB was as straight-forward as you describe. I'm
currently running into problems when transferring, very quickly, some
data from the uC to the PC. The problems are related to overrunning
the PC, where the PC isn't scheduling reads from the device fast
enough to prevent drops. At least interrupt-based I/O can "demand"
attention from the cpu at any time, where USB is at the mercy of
being scheduled.
I do that at 921kbps and had no issues.
I have just finished a project with a PIC32 (MIPS32 core) working as a
voice codec and talking to a linux PC over the USB buss. We got it up to
310 kBytes/s and not dropping a single package during hours of running.
The communication on the PIC side is solved by constantly polling the
USB bus to catch every event.
We had problems with package dropped every ten seconds or so but we
traced it back to a iproute cache flush that the kernel was doing.
The USB bus is fast but with standard hardware it isn't hard to get the
speed up. If you have problem with overruns, check if the PC is doing
some periodic maintainancy or there are any other devices using the bus.
Sorry for being a bit OT but just to add a bit of nostalgia to my post,
my next hobby project will be a transputer link to USB interface.
:-)
/G?ran