Question

I am using LPC1768 as CDC device connected to PXA168 which is running Linux. On LPC side, I have drivers. I have also enabled the PXA linux drivers for usb-serial and cdc-acm drive. When I bootup the board, I get following:-

[    2.539060] usb 1-1.3: new full speed USB device using pxau2h-ehci and address 4
[    2.581029] usb 1-1.3: New USB device found, idVendor=1fc9, idProduct=2002
[    2.587908] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    2.595241] usb 1-1.3: Product: NXP LPC17xx VCOM
[    2.599996] usb 1-1.3: Manufacturer: NXP SEMICOND
[    2.604786] usb 1-1.3: SerialNumber: DEMO00000000

# cat /proc/bus/usb/devices

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 1
B:  Alloc=  0/800 us ( 0%), #Int=  1, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 2.06
S:  Manufacturer=Linux 2.6.34 ehci_hcd
S:  Product=Marvell PXA SOC EHCI Host Controller
S:  SerialNumber=pxau2h-ehci
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480 MxCh= 4
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=05e3 ProdID=0608 Rev=77.64
S:  Product=USB2.0 Hub
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   1 Ivl=256ms

T:  Bus=01 Lev=02 Prnt=02 Port=01 Cnt=01 Dev#=  3 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1908 ProdID=0221 Rev= 1.02
S:  Manufacturer=Generic
S:  Product=USB2.0 Device
S:  SerialNumber=20090909180003
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

**T:  Bus=01 Lev=02 Prnt=02 Port=02 Cnt=02 Dev#=  4 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=02(comm.) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=1fc9 ProdID=2002 Rev= 1.00
S:  Manufacturer=NXP SEMICOND
S:  Product=NXP LPC17xx VCOM
S:  SerialNumber=DEMO00000000
C:* #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=00 Driver=(none)
E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=2ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=(none)
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms**

Now My LPC does not detect any driver. This LPC works fine when used to connect with PC having Windows but there too If I connect to Linux PC, I dont get it running.

Can anyone help me understanding the driver for the linux and which interface will be used to access virtual serial port.

Was it helpful?

Solution

**T:  Bus=01 Lev=02 Prnt=02 Port=02 Cnt=02 Dev#=  4 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=02(comm.) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=1fc9 ProdID=2002 Rev= 1.00
S:  Manufacturer=NXP SEMICOND
S:  Product=NXP LPC17xx VCOM
S:  SerialNumber=DEMO00000000
C:* #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=00 Driver=(none)

You have selected protocol "0" (zero). I had no success with this in Linux. Set the protocol field to "1" in the descriptor: The cdc_acm module will recognize the device and provide you a /dev/ttyACM* device as the serial port.

Code snipped from usbdesc.c:

  USB_INTERFACE_DESCRIPTOR_TYPE,     /* bDescriptorType */
  USB_CDC_CIF_NUM,                   /* bInterfaceNumber: Number of Interface */
  0x00,                              /* bAlternateSetting: Alternate setting */
  0x01,                              /* bNumEndpoints: One endpoint used */
  CDC_COMMUNICATION_INTERFACE_CLASS, /* bInterfaceClass: Communication Interface Class */
  CDC_ABSTRACT_CONTROL_MODEL,        /* bInterfaceSubClass: Abstract Control Model */
  0x01,                              /* bInterfaceProtocol: changed to "01" AT-Command */
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top