Manisha wrote: > hi all, > > i am designing a USB driver code in LPC2148 board. whenever the USB port > receives any data, it generates an interrupt. > > However, i want to design my code by polling method, i dont want any extra > running context i.e an extra ISR. but as i found in the manual the bit in > the endpoint interrupt status register only indicates the reception. is > there any other bit or other CSR(Control status register) where i can get > indication for data reception and use that bit for polling? > > Thanks for going through the problem. > > please help me if anyone has any idea. You can have a look at my open-source USB stack for the LPC214x (see http://sourceforge.net/projects/lpcusb ) This code currently also uses the interrupt bit polling method. The USB interrupt is not connected to the VIC and only the USBDevIntSt register is polled. In case the DEV_STAT interrupt bit is set, the code issues a Get Device Status command to get the device event (reset, connect, suspend). In case the EP_SLOW interrupt bit is set, the code can find out exactly which endpoint(s) caused the interrupt by reading USBEpIntSt. Each logical endpoint consists of two physical endpoints (for IN and OUT), and each physical endpoint has a bit in the USBEpIntSt register. Regards, Bertrik
Message
Re: [lpc2000] Polling for data reception
2006-03-04 by Bertrik Sikken
Attachments
- No local attachments were found for this message.