Kozio USB Virtual COM Port
USB Virtual COM Port Overview
As a way of improving file transfer speeds from a Windows PC to a target processor running VTOS, Kozio provides a USB Virtual COM Port. This COM port is used by the VTOS Program NOR USB product to improve file transfer rates when programming a NOR flash device resident on the target circuit board. Kozio provides both the target drivers and the Windows drivers, providing a fast and easy way to configure your test station for reducing NOR flash programming times.
This document takes you through the process of installing the Kozio driver files for the Kozio USB Virtual COM Port.
Installing for Windows 10
No special Windows 10 driver install is required. The Kozio 3.0.11 installer, or later versions, have been updated to work with the default serial driver used by Windows 10. If desired, you can follow these steps to confirm that Windows 10 did install and will use a USB Serial Device for communicating with VTOS firmware running on your target. This step is optional and is only needed to be done once for confirmation purposes.
- Bring up Windows Device Manager to view a current list of Ports (COM & LPT).
- Note: You can click on the images to view a larger version.
- Program your target with VTOS Program NOR USB
- Run VTOS Developer and open a project that has added a VTOS Program NOR USB task.
- Click Connect to connect over a serial channel from your PC to the your target running VTOS firmware.
- Note: VTOS Developer can also be used to program the VTOS firmware image.
- Click on View | Toggle Advanced Mode
- In the Advanced console window, enter “0 usb.device.start“. The parameter passed to this command is a zero (0). This command enables the USB Device interface on your target and provides a VTOS driver that communicates with the Windows 10 host PC.
- Open Windows Device Manager again to view the newly installed USB Serial Port. In this example, COM29 was created.
- To verify that COM29 is the correct Kozio USB Device, select USB Serial Device (COM29) in Device Manager. Use the right-mouse menu option to select Properties. Click on the Details tab. Under the Property pull-down, select Hardware Ids. Kozio’s registered vendor id is 0x22EC and Kozio’s product id is 0x0100. Under the Value box, you should see these values for the USB Device hardware ids.
You can now use VTOS Program NOR USB to program your target flash memory and use the USB interface for file transfers. This feature significantly reduces the total time required to program flash memory.
Note: You must either restart your target or issue “0 usb.device.stop” to allow VTOS Program NOR USB to work properly. This only has to be done for this confirmation process, VTOS will perform these steps automatically when programming flash memory.
Installing for Windows 7
In order to properly use VTOS Program NOR USB under Windows 7, you must follow these instruction and install a Windows device driver for the Kozio USB Virtual COM Port. Once the Windows driver is installed, the Kozio Windows DLL (vAccess) will automatically discover the COM port and use that COM port to transfer files to VTOS firmware running on your target. The USB interface provides a significantly faster interface for file transfers – much faster than using JTAG or Serial. VTOS firmware communicates over a JTAG or Serial interface, but then uses the USB connection for out-of-band-file transfers. All configuration is set up automatically by the Kozio Windows software and VTOS target firmware.
Installing Kozio USB Virtual COM Port for Windows 7
Using a USB device port on your target circuit board requires the installation of a Windows device driver on the host computer. This process typically only needs to be done once per Windows PC and then Windows will automatically recognize the correct driver for future programming or test steps.
To install the Kozio USB Virtual COM Port driver follow these steps:
- Load and run VTOS firmware on your target circuit board. For example, load and run VTOS Program NOR USB firmware, as is done in this example. You should see version information on the VTOS Developer Console similar to the following:
dut.version VTOS STM32L1XX ProgramNORUSB Firmware Version 03.02.066 16:32:19 Nov 21 2017
- Use the Advanced Mode to be enter a VTOS command that enables the VTOS USB Device driver. The Advanced Mode is accessible through the View | Toggle Advanced Mode menu option under VTOS Developer.
- Note: This step requires that a USB cable be connected from your target circuit board to your Windows PC.
- Enter the command “0 usb.device.start” to enable the VTOS USB device driver. The first argument is a zero (0).
- Once this VTOS command is executed, the Windows Device Manager should refresh with a listing for Kozio Virtual COM Port. You should find this item under Other devices. Under Device Manager, we use the View | Devices by type option.
- Right-click on the Kozio Virtual COM Port and select Update Driver Software…
- Click on Browse my computer for driver software.
- Enter %KOZIO_HOME_3% for the location. Click on Next.
- Note: The VTOS Tools installer installs the correct Windows device driver initialization file. That file is labeled koziocom.inf.
- The driver initialization file supplied by Kozio is not signed, so you will see a warning message. Click on Install this driver software anyway.
- Note: The koziocom.inf driver file is a simple text file that associates the Kozio vendor ID and device ID with the Windows built-in USB serial driver (usbser.sys). Example this text file if you have any concerns.
- The driver software will take a minute or two to install.
- Once the installation is completed, you should see a dialogue indicating Windows has successfully updated your driver software. Click Close.
- Open Windows Device Manager, you should now see the Kozio USB Virtual COM Port (COM#) listed under Ports (COM and LPT).
- The Windows device driver installation is now complete. You must reboot VTOS running on your target circuit board. If a firmware reload is required, reload and reboot.
Running Program File Using USB
With the VTOS Program NOR USB firmware running, and the Windows device driver installed, you are ready to run NOR flash programming operations using USB for the the file transfers.
Here is a quick example of the steps to run a flash program operation using the new Kozio USB Virtual COM Port.
- Launch VTOS Developer and open your STM32 L1xx project or create one.
- Note: This example uses an STM32 L1xx STM32L15xZD processor. The model number, STM32L15xZD in this case, uses the same notation that ST uses.
- Click on the “Add” button and select VTOS Program NOR USB from the options. Click OK.
- Note: The USB device driver does not require a pin configuration file.
- A NOR Flash device is added to the configuration and the correct flash size is configured based on the processor model you chose. Nothing to do in this case.
- A USB Device is also automatically created, but no configuration is required.
- Under the Program Operations node in the Task configuration tree, click on <Add Operation>
- Use the right-click menu to “Add Program From File Using USB“. Click on this new node.
- Under the Settings panel:
- Click on the column to the right of the Destination parameter. Choose “STM32 Flash” from the pull-down.
- Choose a Destination Offset. We choose 0x0 in this example, which will overwrite the VTOS firmware running on the target. So, this is a single-shot operation.
- Choose a Source. Click on the column to the right an click on the ellipses button to browse for a file on your PC.
- Enter a Source Offset if you want to skip over the first N bytes in the file chosen. We choose 0x0, so the entire source file will be programmed.
- To run the program operation, double-click on the “Program File Using USB” tree node or click on the “Run” button.
The operation performed took about 13 seconds to program 384 KiB. The steps performed are displayed to the VTOS Developer Console window, as shown in the screen capture above. Once completed, we see a PASSED status along with a DISCONNECTED status. The program operation was successfully, but since we overwrote the VTOS program running from flash memory, we can no longer run additional VTOS commands, and so we automatically disconnected. To run additional VTOS commands, you must program Flash memory and run that VTOS firmware.