Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Thread

USB Problem

USB Problem

2006-05-31 by nicolkb1

Help anyone,

We are in the process of developing a new USB Printer using an 
LPC2148 processor.  

The USB Interface is configured just fine to use EndPoint 2 as a BULK 
Transfer Endpoint and we are using Bi-directional protocol.

Using Keil USB routines which came with the MCB2140 development 
prototyping hardware, we have been able to configure the hardware and 
get the communication start up is fine.  

We have observed the first transaction across EndPoint2 is an IN 
request, coming from the LPC2148.  We are puzzled by this, we would 
have assumed the first transaction would have been an OUT request 
from the Host side.

Is this a setup issue???

Since the application on the LPC2148 has no data to send it is not a 
problem at first start.  However, after a couple of commands have 
been processed, and their has been several USB Nak'd packets a 
problem occurs.

The problem is occurs when the Host sends an OUT Command with the 
expectation of getting Data returned, the USBPrint.sys and 
application is looking for couple of bytes of data to be returned in 
an IN Packet.  The problem is the LPC2148 resends the Last 
Transmission to the Host again, on the IN request prior to the OUT 
command.

Are we missing a setup condition, which configures the (IN before 
OUT) request or (OUT before IN) request in the USB interface or the 
LPC2148 USB controller setup??? 

Is their something which needs to be done to clear out the EndPoint 2 
Transmit data area in ram???

We sure would appreciate some insight from someone.

Keith and Dwight

Re: [lpc2000] USB Problem

2006-05-31 by Clyde Stubbs

On Wed, May 31, 2006 at 07:23:54PM -0000, nicolkb1 wrote:
> We have observed the first transaction across EndPoint2 is an IN 
> request, coming from the LPC2148.  We are puzzled by this, we would 

Where are you observing this? It can't be on the USB since
all requests on the USB come from the host - slaves only ever
send responses.


-- 
Clyde Stubbs                     |            HI-TECH Software
Email: clyde@...          |          Phone            Fax
WWW:   http://www.htsoft.com/    | USA: (408) 490 2885  (408) 490 2885
PGP:   finger clyde@...   | AUS: +61 7 3722 7777 +61 7 3722 7778
---------------------------------------------------------------------------
HI-TECH C: compiling the real world.

Re: USB Problem

2006-05-31 by ian.scanlon

--- In lpc2000@yahoogroups.com, "nicolkb1" <nicolkb1@...> wrote:
>
> Help anyone,
> 
> We are in the process of developing a new USB Printer using an 
> LPC2148 processor.  
> 
> The USB Interface is configured just fine to use EndPoint 2 as a 
BULK 
> Transfer Endpoint and we are using Bi-directional protocol.
> 
> Using Keil USB routines which came with the MCB2140 development 
> prototyping hardware, we have been able to configure the hardware 
and 
> get the communication start up is fine.  
> 
> We have observed the first transaction across EndPoint2 is an IN 
> request, coming from the LPC2148.  We are puzzled by this, we would 
> have assumed the first transaction would have been an OUT request 
> from the Host side.
> 
> Is this a setup issue???
> 
> Since the application on the LPC2148 has no data to send it is not 
a 
> problem at first start.  However, after a couple of commands have 
> been processed, and their has been several USB Nak'd packets a 
> problem occurs.
> 
> The problem is occurs when the Host sends an OUT Command with the 
> expectation of getting Data returned, the USBPrint.sys and 
> application is looking for couple of bytes of data to be returned 
in 
> an IN Packet.  The problem is the LPC2148 resends the Last 
> Transmission to the Host again, on the IN request prior to the OUT 
> command.
> 
> Are we missing a setup condition, which configures the (IN before 
> OUT) request or (OUT before IN) request in the USB interface or the 
> LPC2148 USB controller setup??? 
> 
> Is their something which needs to be done to clear out the EndPoint 
2 
> Transmit data area in ram???
> 
> We sure would appreciate some insight from someone.
> 
> Keith and Dwight
>

I suggest you look at www.hhdsoftware.com for their USB monitor 
software.  This will decode most of the usb transactions.  That and a 
copy of the usb spec and you will be going in no time.  You can DL a 
time limited evaluation copy and solve you troubles right away.  I 
bought a copy and it didn't take long to pay for its self (our first 
problem was solved in about 10 minutes).  No idea what your 
engineering time costs, but the U$49 package can save you a lot of 
time...

Regards,
Ian

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.