This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

USB virtual comm

Hello friends,

I am trying to implement USB virtual comm on lpc2148 board

I am referring AN801 USB Virtual comport.zip code

which has following files

Demo.c - main entry of the sample software
Demo.h - definitions and include file for the main entry
Startup.s - boot-up file
Type.h - various type definition
Usb.h - USB descriptor data structures and class definitions
Usbcfg.h - USB configuration header file
Usbcore.c - USB standard class request, USB command processor
Usbcore.h - definition and include file for usbcore.c
Usbdesc.c - USB descriptor configuration
Usbdesc.h - definition and include file for usbdesc.c
Usbhw.c - USB hardware initialization and lower-level driver APIs
Usbhw.h - prototyping for usbhw.c
Usbreg.h - hardware USB block register definitions for LPC214x
Vcomuser.c - Virtual COM port configuration and physical COM port APIs
Vcomuser.h - endpoint event definition and include files for vcomuser.c
Virtualcom.prj - Keil uVision III project file

I am stuck in demo.c if ( Data2Host0 || Data2Host1 )
to find out the problem i put few print statements in some functions
when i connect my device to usb the pc is not giving any warning like usb detected...
please help me....

Parents Reply Children
  • Dear Mr.Tsuneo Chinzei

    Thank You for your reply

    I am not getting where exactly the USB enumeration is done

    my code goes in USB ISR there it does not go inside any IF statement

    I have gone through some of your solutions like

    USB_SOF_EVENT = 1

    and some other changes in EndPoint2

    void USB_EndPoint2 (DWORD event)
    { switch (event) { case USB_EVT_IN: Data2Host0 = 1; break; case USB_EVT_OUT: DeviceData2UART( 0 ); break; } event = event;
    }

    But my question is we are using endpoint3 and endpoint9
    not endpoint2 and 5 so the above routine should be in 3 and 9 right?

    I may be asking silly questions because i am completely new in this

    Please help.....

  • I made changes as per your suggestion to Mr Kamalkant Joshi

    my code is also going in(vcomuser.c)
    #if USB_SOF_EVENT
    void USB_SOF_Event (DWORD frame)

    what should I write inside this function

    where is USB enumeration or configuration is done

    please help me

    i think i am confusing myself

    please help me.....

  • I am using AN801 USB Virtual Com port code

  • I said, it isn't a firmware problem, but PC side.
    When the PC driver would be installed without error, the driver should put Set_Configuration request (Select_Configuration URB) at enumeration. As your LPC chip doesn't see Set_Configuration, there should be trouble on driver installation.

    Check Device Manager on your PC.

    Tsuneo

  • Dear Tsuneo chinzei, am working on IAR evalution board (LPC2148) for USB virtual com. The sample code from keil is not working in this board.

    Let me know wether it'll work or not, if possible what are the changes to be done?

    wait 4 ur reply

    thanking you....