Discussion group dedicated to the Philips LPC2000 family of ARM MCUs
So far in May, you have voted 0 times ou of a total of 20 votes by the community.
Please help us clean the archives from unuseful discussion threads by using the voting system! Details here.
Is this thread worth a thumbs up?
USB Bulk flow control - Thiago Takehara - Dec 15 18:06:32 2006
Hi,
I'm developing an USB printer. All the enumeration process is working
ok, and I can print lots of data using a Windows printer driver and
the default USB printer port driver. However, sometimes I need to
block the bulk OUT endpoint because my printer is busy, because for
example it's out of paper and the receive buffer is full.
I haven't found any information on LPC2146's manual on how to make
this flow control. I've tried to not clear the EP_RAM buffer, disable
EP interrupt and set the DA bit, and all this tries have failed.
I believe I can't set this endpoint STALL, because I think STALL is
just for an EP experiencing errors, am I right? Additionally, my USB
sniffer says that Windows is sending a RESET_PIPE command, trying to
unstall the EP.
What can I do to handle this?
Thanks in advance,
Thiago Takehara
(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )Re: USB Bulk flow control - Wojciech Kromer - Dec 19 15:06:24 2006
Have You found any sollution?
I have almost same problem with ACM driver for USB-UART emulation.
There is no problem with UART->USB direction, UART is much slower,
but how to notice USB host to not send more data for a moment?
I'm using DMA.
(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )Re: USB Bulk flow control - Jan Thogersen - Dec 19 15:30:23 2006
Wojciech Kromer wrote:
> Have You found any sollution?
>
> I have almost same problem with ACM driver for USB-UART emulation.
>
> There is no problem with UART->USB direction, UART is much slower,
> but how to notice USB host to not send more data for a moment?
> I'm using DMA.
>
Isn't that what STALL is for?
Regards
Jan
(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )Re: USB Bulk flow control - Wojciech Kromer - Dec 19 21:13:02 2006
> Isn't that what STALL is for?
>
Does this work for one EP or whole device?
Will it stop DMA-enabled endpoints?
What happens with currently received bulk?
I want to stop bulk-OUT EP only.
It's also important to receive all data, but a bit slower...
For my sollution,I've found there is also INT EP with status to send.
Now i'm digging in docs...
(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com ) Re: USB Bulk flow control - Bertrik Sikken - Dec 20 3:06:12 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Wojciech Kromer wrote:
>> Isn't that what STALL is for?
>>
> Does this work for one EP or whole device?
> Will it stop DMA-enabled endpoints?
>
> What happens with currently received bulk?
>
> I want to stop bulk-OUT EP only.
> It's also important to receive all data, but a bit slower...
>
> For my sollution,I've found there is also INT EP with status to send.
> Now i'm digging in docs...
What happens if you simply do not read the bulk out endpoint buffer?
In that case, the device should NACK any more data coming from
the host. The host should retry to send the data later.
I'm not 100% sure that this works, but it looks like the simplest
solution to me. I don't know what kind of timeouts the host uses.
Kind regards,
Bertrik
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla -
http://enigmail.mozdev.org
iD8DBQFFiO6hETD6mlrWxPURAnndAJ4wr+zUMinagidJMzDxsczK6tGHTACdF/bz
Vf64q7ymqoC0CQLATf64Y1Q=7GRm
-----END PGP SIGNATURE-----
(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )Re: USB Bulk flow control - Wojciech Kromer - Dec 21 17:19:12 2006
> What happens if you simply do not read the bulk out
endpoint buffer?
> In that case, the device should NACK any more data coming from
> the host. The host should retry to send the data later.
>
>
It seems to work. Simpler is better :)
I still have some problems with raw large transfers, but z-modem works
fine on it.
(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )