Usb virtual com port lpc1788

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Usb virtual com port lpc1788

4,362 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by SUKETEK on Tue Jun 19 18:20:34 MST 2012
[FONT=Calibri]In the NXP SAMPLE APPLICATIONS FOR THE LPC1788 DEV KIT\ EXAMPLES\USBDEV\USB_VirtualCom folder (extracted from the lpc177x.lpc178x.cmsis.driver.library.zip”), the abstract.txt contains the following:[/FONT]


[FONT=Calibri]Quote:[/FONT]


[FONT=Calibri]/***********************************************************************[/FONT]
[FONT=Calibri]* $Id$ abstract.txt 2011-06-02 [/FONT]
[FONT=Calibri]* @file USBDEV\Usb_VirtualCom\abstract.txt [/FONT]
[FONT=Calibri]* @brief Description of the USBDEV Virtual COM example.[/FONT]
[FONT=Calibri]* @date 02. June. 2011[/FONT]
[FONT=Calibri]* @author NXP MCU SW Application Team[/FONT]
[FONT=Calibri]* [/FONT]
[FONT=Calibri]* Copyright(C) 2011, NXP Semiconductor[/FONT]
[FONT=Calibri]* All rights reserved.[/FONT]
[FONT=Calibri]*[/FONT]
[FONT=Calibri]@Example description:[/FONT]
[FONT=Calibri]Purpose:[/FONT]
[FONT=Calibri]This example describes how to use USBDEV on LPC177x_8x to demo the virtual COM port.[/FONT]
[FONT=Calibri]Process:[/FONT]
[FONT=Calibri]The PC will install a virtual COM port on the PC (see Driver Installation).[/FONT]
[FONT=Calibri]After installation an additional port "LPC177x_8x USB VCom Port(COMx)"[/FONT]
[FONT=Calibri]can be found under System/Hardware/Device Manager/Ports(COM&LPT).[/FONT]
[FONT=Calibri]Number "x" is not fixed as different PC configuration may have different [/FONT]
[FONT=Calibri]"x" displayed on the device manager. The USB host driver assigns "x" [/FONT]
[FONT=Calibri]dynamically based on the existing COM port configuration of the system.[/FONT]

[FONT=Calibri]Testing the USB Virtual COM port with serial cable:[/FONT]

[FONT=Calibri]Open two Hyperterminal windows. [/FONT]
[FONT=Calibri]One with "LPC177x_8x USB VCom Port(COMx)" [/FONT]
[FONT=Calibri]One with "Communications Port (COM1)".[/FONT]
[FONT=Calibri]Connect PC port COM1 to the [B][SIZE=2][COLOR=navy]comport[/COLOR][/SIZE][/B] on the board and open "COM1" [/FONT]
[FONT=Calibri]and "COMx". etc[/FONT]

[FONT=Calibri]End quote.[/FONT]

[FONT=Calibri][FONT=Calibri]As far as I understand there are 2 connections to be made with the PC from the dev kit:[/FONT][/FONT]
[FONT=Calibri][FONT=Calibri]1) A USB connection that will enumerate as a virtual COM port X. [COLOR=red]Is this a physical connection from J19 (on the 1788 dev kit) to the PC[/COLOR]?[/FONT][/FONT]

[FONT=Calibri][FONT=Calibri]2) A second connection from "PC port COM1 to comport on the board". There are two things I need help with: [/FONT][/FONT]
[FONT=Calibri][FONT=Calibri]a) [COLOR=red]What is “comport” on the dev kit[/COLOR]?[/FONT][/FONT]
[FONT=Calibri][FONT=Calibri]b) [COLOR=red]What is[/COLOR] [COLOR=red]COM1 on the PC. Is it a second virtual com port or an actual serial port using a DB9 connection[/COLOR]?[/FONT][/FONT]


[FONT=Calibri][FONT=Calibri]I am using LPCXpresso v4.2.3 and the LPC-LINK.[/FONT][/FONT]

[FONT=Calibri][FONT=Calibri]Regards,[/FONT][/FONT]

[FONT=Calibri][FONT=Calibri]Istvan[/FONT][/FONT]
0 Kudos
Reply
13 Replies

3,781 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by hellospencer on Fri Jul 13 16:13:28 MST 2012
Great! Thanks a lot! Now I got the example running :D !
0 Kudos
Reply

3,781 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gbm on Tue Jul 10 12:18:22 MST 2012
Don't debug - just run the program and then connect the cable. If the pullup resistor is not switched via transistor, the device is always connected, but the host cannot recognize it if the firmware is not running.
0 Kudos
Reply

3,781 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by hellospencer on Tue Jul 10 04:54:48 MST 2012
Thanks. I inserted such a resistor and now a ACM0 device shows up after I play around with starting to debug, plugging and unplugging the cable.

So, I the example still does not run reliably.

In order to see an ACM device, I have to do following procedure:

[LIST=1]
[*]plug usb cable
[*]start debug 'RDB1768 ...' in the CodeRed IDE
[*]Resume
[*]Terminate
[*]replug usb cable
[/LIST]
Then the system is in a state where 'ls /dev/ttyACM0' actually there, but the device file is not accessible.

Is there still a bug in the hardware setup? Any ideas?
0 Kudos
Reply

3,781 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gbm on Tue Jul 10 03:01:03 MST 2012
You are clearly missing the 1k5 pullup resistor on D+. That's why your device is recognixed as low speed, while the LPC is full speed.
0 Kudos
Reply

3,781 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by hellospencer on Tue Jul 10 02:15:00 MST 2012
Ah, the right word is stripboard. Essentially, the same you have used ;)

I'm sure your setup is correct. I want to have the same :)

My connection is

http://www.picvalley.net/v.php?p=u/2932/1733865551368647151341911644tHLUVCIMo3Nn4EcuejCT.JPG

PC  <---usb cable---> stripboard with type-b connector and pins <--cables--> lpcxpresso

I connected:

Connector B <---> lpcxpresso
1 VBUS   J6-19
2 D-          J6-36
3 D+         J6-37
4 GND     J6-1

Following your picture you connected 1 VBUS to J6-2 (ext power) rather than to J6-19. However, this does not work either. So where could there be an error?

Thanks
0 Kudos
Reply

3,781 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Tue Jul 10 01:52:09 MST 2012

Quote: hellospencer
I've soldered a type B connector on a breadboard, similar to the picture from below (no resistors on D+/D-, no pull-up on D+ like in Fig 48.). Is this the correct setup?



Soldered to what :confused: LPCXpresso1769 :confused:

Picture and description of #7 shows a correct wiring of LPCXpresso1769 & USB :eek:
0 Kudos
Reply

3,781 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by hellospencer on Tue Jul 10 01:38:50 MST 2012
Hello, I'm having problems to run the RDB1768cmsis2_usb_serial example.

Simply put, it doesn't work.

I've soldered a type B connector on a breadboard, similar to the picture from below (no resistors on D+/D-, no pull-up on D+ like in Fig 48.). Is this the correct setup?

I'm running Ubuntu 12.04. The dmesg output says something like:

Quote:
[   94.384337] usb 6-1: new low-speed USB device number 3 using uhci_hcd
[   94.504072] usb 6-1: device descriptor read/64, error -71
[   94.732047] usb 6-1: device descriptor read/64, error -71
[   94.948095] usb 6-1: new low-speed USB device number 4 using uhci_hcd
[   95.068076] usb 6-1: device descriptor read/64, error -71
[   95.296043] usb 6-1: device descriptor read/64, error -71
[   95.512065] usb 6-1: new low-speed USB device number 5 using uhci_hcd
[   95.920057] usb 6-1: device not accepting address 5, error -71
[   96.032081] usb 6-1: new low-speed USB device number 6 using uhci_hcd
[   96.440074] usb 6-1: device not accepting address 6, error -71
[   96.440097] hub 6-0:1.0: unable to enumerate USB device on port 1

I've run successfully some ttyACMx devices on that box, so the PC-side should be alright.

Does someone have a clue what's going on? Thanks!
0 Kudos
Reply

3,781 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Mon Jul 02 15:48:29 MST 2012

Quote: tsh
I'm really confused.



Yes, you are. This is an LPC1788 Dev kit thread ;)

To connect USB (device) function with LPCXpresso1769 it's necessary to add an USB connector ( D+ / D-). Everything else (switched pullup...) is already on your board :rolleyes:

Picture: http://flic.kr/p/cqiANq
0 Kudos
Reply

3,781 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tsh on Mon Jul 02 15:22:14 MST 2012
The documentation for these code examples is driving me spare. I assumed that LPC-espresso would be kind of similar to mbed, but I don't think so any more.

I'm using LPC1769 LPC-espresso board, and Code Red toolchain 4.2.3. After realising that 'blinky' in the quickstart guide means LPCX176x_cmsis2_systick I'm happy my board is OK...

Now, the USBCDC example talks about some other target board, but the quickstart guide is kind of suggesting that I can connect a USB cable direct to the dev board. (Fig 49 in the quickstart quide helpfully shows a cut off USB-A and a PCB, with a virtual interface between them)

usbcdc_abstact.txt seems to be talking mostly about the oddities of a windows machine - and now that there is mention of FTDI in the thread above, I'm really confused.

I think the example is presenting USB-CDC on J6-36/J6-37, and a UART on J6-9/J6-10 on the target, with a pass through in software between the two. That would mean the virtual comm port being implemented in the LPC1769 - no???

Is it possible to at least review the readme's for the example code so they give some help about context? If the examples are supposed to be generic, it would help to make the descriptions a bit more detailed (or cross reference a wiki)
0 Kudos
Reply

3,781 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Sat Jun 23 09:16:59 MST 2012

Quote:

Can In-System-Programming be performed from the PC COM port usingthe USB on J19?

No, ISP is only available with UART0 :(

Quote:

If no ISP feature is available on J19 what is the recommended mechanism to do firmware upgrade in the field?

Use USB bootloader or some kind of other bootloader (via SD?). There are several threads about bootloader (at least LPC1769) here  :)
0 Kudos
Reply

3,781 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by SUKETEK on Sat Jun 23 08:35:14 MST 2012
Thanks for the quick reply.:D


[FONT=Calibri]Can In-System-Programming be performed from the PC COM port usingthe USB on J19? [/FONT]

[FONT=Calibri]On the LPC1788 dev kit this is done by using the FTDI chip to control P2[10] and /RESET and to start the ISP command handler using UART0. Since the USB on J19 has no access to P2[10], if there is a solution, it must becommand based. I was wondering if there is such feature.[/FONT]

[FONT=Calibri]If no ISP feature is available on J19 what is the recommended mechanism to do firmware upgrade in the field? [/FONT]

[FONT=Calibri]I am trying to avoid the FTDI chip if possible in my new design. There is no second source for this IC so several hundred ICs would have to be held on the shelf as a buffer for production and supply chain hiccups, then there is the extra cost for the IC, PCB real estate and labor. Furthermore there is the occasional defect due to ESD etc. that always happens when the product is shipped to Singapore or New Zealand and shipping costs add up pretty fast. All these potential pitfalls could be avoided if I don’t have to use the FTDI chip.[/FONT]
0 Kudos
Reply

3,781 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by SUKETEK on Wed Jun 20 05:25:49 MST 2012
Thanks :D
0 Kudos
Reply

3,781 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Tue Jun 19 19:53:14 MST 2012

Quote: SUKETEK

[FONT=Calibri][FONT=Calibri]As far as I understand there are 2 connections to be made with the PC from the dev kit..[/FONT][/FONT]


Yes :)

Quote: SUKETEK

[FONT=Calibri][FONT=Calibri]1) A USB connection that will enumerate as a virtual COM port X. [COLOR=red]Is this a physical connection from J19 (on the 1788 dev kit) to the PC[/COLOR]?[/FONT][/FONT]


Yes, close Jumper J15 (Force USB Connect) ;)


Quote: SUKETEK

[FONT=Calibri][FONT=Calibri]2) A second connection from "PC port COM1 to comport on the board". There are two things I need help with: [/FONT][/FONT]
[FONT=Calibri][FONT=Calibri]a) [COLOR=red]What is “comport” on the dev kit[/COLOR]?[/FONT][/FONT]
[FONT=Calibri][FONT=Calibri]b) [COLOR=red]What is[/COLOR] [COLOR=red]COM1 on the PC. Is it a second virtual com port or an actual serial port using a DB9 connection[/COLOR]?[/FONT][/FONT]


a: That's USB mini-B Connector J25.
b: It's also a virtual com port (FTDI) :)
0 Kudos
Reply