Yahoo Groups archive

Lpc2000

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

Message

RE: [lpc2000] Re: Please help:: checking for data receive in USB Endpoint

2006-04-07 by Manisha Kalita

can you give me the proper link for IAR code?

about my code:

/*Enable Read Mode and program the LOG_ENDPOINT High*/
USB_CTRL = (DATA_TRANS_EP  << 2) | CTRL_RD_EN;

& then i am checking for PKT_RDY bit as below.
if (RX_PLENGTH & PKT_RDY)
read the data.


& here the if condition is always true. thats the main problem.

regards,
Manisha


-----Original Message-----
From: lpc2000@yahoogroups.com [mailto:lpc2000@yahoogroups.com]On Behalf
Of ian.scanlon
Sent: Friday, April 07, 2006 7:13 PM
To: lpc2000@yahoogroups.com
Subject: [lpc2000] Re: Please help:: checking for data receive in USB
Endpoint


--- In lpc2000@yahoogroups.com, Manisha Kalita <manisha@...> wrote:
>
> ya its lpc 2148 board
> ARM7 running at 60MHz, flash of 512 KB, RAM with 32 KB + 8 KB 
Shared with
> USB DMA & USB 2.0 Device controller (Full Speed)DMA supported. 
using gcc. &
> yes some help from sample code, i dont remeber the source.
> 
> Regards,
> Manisha
> 
> -----Original Message-----
> From: lpc2000@yahoogroups.com [mailto:lpc2000@yahoogroups.com]On 
Behalf
> Of ian.scanlon
> Sent: Friday, April 07, 2006 6:36 PM
> To: lpc2000@yahoogroups.com
> Subject: [lpc2000] Re: Please help:: checking for data receive in 
USB
> Endpoint
> 
> 
> --- In lpc2000@yahoogroups.com, Manisha Kalita <manisha@> wrote:
> >
> > Hi all,
> >
> > i am designing an USB driver in lpc2000 board.
> 
> lpc2000 board?? what hardware? compiler? using example code from
> ____? PC test application?
> 
> 
> 
> it is sending the data
> > properly. however, during reception, i am checking if any data is
> there in
> > the deveice register RXPLENGTH. if there is any peacket, PKT-RDY
> bit of this
> > register is set. but, in my case, even though no data is sent from
> the host,
> > PKT_RDY bit is always set. i am using interrupt transfer and so
> using
> > logical endpoint as 1.
> >

Can't really say why your code doesn't work, but the example code 
from Keil and IAR works well (mostly).

Take a look at the IAR USB sample code. LPC_USB.c -> USB_EpRead(...  
It is copyrighted so I won't post it here.  Did you write the Read 
enable bit?








 
Yahoo! Groups Links



 



The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s)and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender or administrator@...

Attachments

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.