vcom_connected() == FALSE Ubuntu Linux 14.04 - Use USB for Serial Monitor
06-15-2016
11:39 AM
1,636 Views


NXP Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Content originally posted in LPCWare by a_bet on Fri Mar 18 07:14:02 MST 2016
Hi everyone,
I'm new to lpcxpresso and to the arm world. I've bought a lpcxpresso 43s37 board, which is doing fine with all the lpcopen examples i've tried.
In order to do some ADC and dsplay the data I'd like to set up the serial monitor.
Sadly I don't have a usb-uart adaptor so I'm trying to use the vcom on J5 as said in the docs.
When I build and debug the usbd_rom_cdc_vcom example from the LPCOpen folder everything seems ok, and the debug console gives no error. But the simply anything happens: no Hello World printed on the Console.
Observing the Step Over execution I noticed that the 1st if statement in the superloop is always false.
The superloop is as follows
Quote:
while (1) {
/* Check if host has connected and opened the VCOM port */
if ((vcom_connected() != 0) && (prompt == 0)) {
vcom_write("Hello World!!\r\n", 15);
prompt = 1;
}
/* If VCOM port is opened echo whatever we receive back to host. */
if (prompt) {
rdCnt = vcom_bread(&g_rxBuff[0], 256);
if (rdCnt) {
vcom_write(&g_rxBuff[0], rdCnt);
}
}
/* Sleep until next IRQ happens */
__WFI();
}
So, it seems that the VCOM is actually NOT connected.
Since in the readme.txt is given no advice for linux users I'm quie stuck at this point.
Any hint woulb be higly appreciated,
thanks in advance
Hi everyone,
I'm new to lpcxpresso and to the arm world. I've bought a lpcxpresso 43s37 board, which is doing fine with all the lpcopen examples i've tried.
In order to do some ADC and dsplay the data I'd like to set up the serial monitor.
Sadly I don't have a usb-uart adaptor so I'm trying to use the vcom on J5 as said in the docs.
When I build and debug the usbd_rom_cdc_vcom example from the LPCOpen folder everything seems ok, and the debug console gives no error. But the simply anything happens: no Hello World printed on the Console.
Observing the Step Over execution I noticed that the 1st if statement in the superloop is always false.
The superloop is as follows
Quote:
while (1) {
/* Check if host has connected and opened the VCOM port */
if ((vcom_connected() != 0) && (prompt == 0)) {
vcom_write("Hello World!!\r\n", 15);
prompt = 1;
}
/* If VCOM port is opened echo whatever we receive back to host. */
if (prompt) {
rdCnt = vcom_bread(&g_rxBuff[0], 256);
if (rdCnt) {
vcom_write(&g_rxBuff[0], rdCnt);
}
}
/* Sleep until next IRQ happens */
__WFI();
}
So, it seems that the VCOM is actually NOT connected.
Since in the readme.txt is given no advice for linux users I'm quie stuck at this point.
Any hint woulb be higly appreciated,
thanks in advance
Reply
3 Replies
04-29-2019
06:50 AM
1,424 Views
monparahimanshu
Contributor I
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
you can remove the hello world statement.
what code does is, when you open the port and send first string it sends back to host and afterwords it enter into the command transmitting loop.
in Linux you can install screen and try to send any char it will send back.
i hope it works, let me know if you have any question.+
Regards,
himanshu
06-07-2017
10:21 AM
1,424 Views
rishitborad
Contributor II
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Any one faced this issue? Whats the cause?
Thanks
Rishit
06-18-2016
06:05 PM
1,424 Views


NXP Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
bump
