3524 views|5 replies

227

Posts

0

Resources
The OP
 

How to use the virtual serial port VCOM function of J-Link? [Copy link]

Most modern PCs no longer have physical COM ports. However, many hardware setups still use UART for logging, diagnostics, and application control. The alternative is to use a USB device that appears as a COM port on the PC.

Virtual COM Port (VCOM) is a technology used to replace traditional COM ports on modern PCs. From the host's point of view, there is no difference between the actual physical COM port and the virtual COM port. Virtual COM ports are presented in the same way and provide the same functionality. Virtual COM port functionality is implemented through the USB protocol. J-Link provides virtual COM functionality. In the case of J-Link, if the virtual COM port is enabled, J-Link appears as a composite device with multiple interfaces: J-Link functionality and COM Port interface, both of which can be used at the same time.

Enable VCOM

Normally, the VCOM function of J-Link can be disabled/enabled via J-Link Commander and J-Link Configurator.

  • Note that VCOM can only be used when debugging via the SWD target interface. Pin5 = J-Link-Tx (out), Pin17 = J-Link-Rx (in).

  • Currently, only J-Link models with hardware version 9 or higher have VCOM functionality.

1. Through J-Link Configurator

Connect the J-Link, start the J-Link Configurator and open the configuration interface as shown by double-clicking the device. Under "Virtual COM-Port", select "Enable" and click "OK". After that, you need to restart the device for VCOM to work properly.

Figure: J-Link Configurator

2. Through J-Link Commander

Connect the J-Link, launch J-Link Commander, and type "vcom enable". After that, you need to reboot the device for VCOM to work properly.

3. Check VCOM status

After enabling the VCOM function, you can check whether VCOM is active by opening the Device Manager. As shown in the figure below, the connected device with VCOM function will be listed under "Ports (COM & LPT)".

Figure: J-Link VCOM

Test VCOM functionality and speed

After enabling VCOM, you can test the VCOM functionality by simply connecting the Tx pin with the Rx pin, establishing a loopback this way -, launching the terminal application. The Rx pin will receive the transmitted data, which means that VCOM is active and working.

  • A loopback is established by connecting the Tx pin with the Rx pin.

  • Make sure pins VTref and GND are connected to the J-Link. For testing, VTref = 3.3V is recommended.

  • Start a terminal application (e.g. HTerm) and establish a connection to the COM port.

  • Use an oscilloscope to visualize the signal sent through the Tx pin and the Rx pin.

  • Use the given terminal application to send data over VCOM. Use the letter "U" (binary 01010101) to create a regular square wave signal.

An oscilloscope will show the same sequence of signals on both the Rx and Tx pins, confirming VCOM functionality. The speed of VCOM can also be determined with an oscilloscope by measuring the duration of a single high state.

Figure: Testing VCOM function and speed

Latest reply

Never used this feature   Details Published on 2021-4-29 10:48

赞赏

1

查看全部赞赏

Personal signature

欢迎关注“麦克泰技术”

 
 

6547

Posts

0

Resources
2
 

How to solve pin conflicts in JTAG mode when using in SWD mode

 
 
 

7422

Posts

2

Resources
3
 

VCOM can only be used when debugging through the SWD target interface

Personal signature

默认摸鱼,再摸鱼。2022、9、28

 
 
 

1942

Posts

2

Resources
4
 

Never used this feature

 
 
 

227

Posts

0

Resources
5
 
w494143467 posted on 2021-4-29 10:48 I have never used this function

Have a chance to try it~

Personal signature

欢迎关注“麦克泰技术”

 
 
 

227

Posts

0

Resources
6
 
Jacktang posted on 2021-4-28 16:31 How to solve the pin conflict in JTAG mode when using in SWD mode

SWD and JTAG are pin multiplexed, so you can only use one at a time.

Personal signature

欢迎关注“麦克泰技术”

 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list