cypress KitProg usbuart Windows driver issues. Suggestions on Fixing?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
WaMa_286156
Level 5
Level 5
First comment on blog 100 replies posted 50 replies posted

I am using Windows 7 in a virtual machine on Macintosh.  This issue may be fixed in the Windows 10 driver. However, Windows 10 is not allowed at our company due, in part, to the keylogger (see this report from PCWorld​ ), and other data logging features that leaks proprietary information back to Microsoft.   Only the enterprise edition can turn off all the data loggers.  Microsoft has a very long page on accomplishing this, if you are interested.

As many of you know, when you plug in a CY8CKIT-059 on the debugger stub side, you get a serial port (a USBUART) that is connected to P12.6 and P12.7 on the target portion of the CY8CKIT-059.  You can use a terminal program like TeraTerm or Putty and print messages using a UART in your project connected to those pins.

If the VM is rebooted, and the KitProg is connected, the USBUART generally works.  It also typically shows the USBUART in the list of USB devices available to attach to the VM in VMWare's list.   If you unplug and replug the KitProg, the USBUART driver shows up in the Com Port section (i.e. COM Port 46), and the terminal programs connect to it, but no serial data.  The KitProg debugger continues to work.

If you disconnect the KitProg from the VM, then the Macintosh shows the USBUART like so:

ls /dev/tty.*

/dev/tty.Bluetooth-Incoming-Port /dev/tty.usbmodem1423 /dev/tty.HC-06-DevB /dev/tty.usbserial-A600esPZ

The tty.usbmodem1423 is the Cypress USBUART.  The tty.usbserial-A600esPZ is an FTDI chip plugged into the Macintosh. It works fine with windows or Mac.  No issues.

By running the "screen" program on the macintosh, I get a USBUART connection that works:

screen /dev/tty.usbmodem1423 115200

The screen program connects and communicates with the USBUART running on the KitProg just fine.  So, the problem does not appear to be with the code on the debugger stub, but either with the Windows Driver or how VMWare sees the USB device and hands it back to Windows.  Looking at the details on the windows driver (under right click on Computer: choose Manage: choose Device Manager, everything looks good.  Running the Bridge Control Panel shows the driver (i.e. COM46); it also connects and disconnects to that port, but still no data gets through when restarting, disconnecting and reconnecting with the port using Tera Term or Putty.

I have the latest downloaded from Cypress, PSOC Programmer 3.28.6, and everything else is working just fine.  I noticed this problem a few months ago, right after the CMSIS code was put in, but had too much going on for it to bother me.

I have also seen this when creating a USBUART using Vendor ID 0x4b4 and Product ID 3, 5, or 8 during engineering builds to test my PSOC code.  Linux and Macintosh work fine, Windows usually works after a fresh reboot, but rarely after that, after a plug/replug.  No driver errors reported.  I have fixed the Cypress example USB code to prevent hanging in my application. (works for Linux and Mac). I have *not* touched the KitProg code, which is proprietary.  I have *not* used my USBUART code when the KitProg USBUART fails.  It will fail even if I *never* plug in my USBUART, and I have rebooted my machine to get a fresh driver loaded to troubleshoot this issue.

Any suggestions?  I have followed the previous threads int the community and reloaded drivers, etc, but no luck so far.

0 Likes
1 Solution

I went through the steps here: PSoC5LP USBUART, signed driver?

That did not work with 0x4b4 and 3 as USBUART parameters.  After 4 hours of installing, removing, rebooting, uninstalling, following different suggestions on the internet, with nothing from the Cypress community or internet at large working, I decided to uninstall and delete the drivers and reboot (without devices plugged in).

I went back to the USBUART and deleted USBUART, and put it back into the Schematic.  I rebuilt.  I plugged in the Kitprog, and all the drivers had to be re-installed.  They installed successfully. 

I then plugged in the USBUART and interrupted its install from Windows Update.  I pointed it to the driver file in the PSOC directory:  ProjectName.cysdn\Generated_Source\PSOC5 and installed that unsigned driver (under windows 7).

Now, the KitProg USBUART shows up in the serial port list, and the new USBUART shows up.  I connected to it with Tera Term Pro, and the system does not lock up now.

One problem I saw, was if you use USBUART_PutString(string), there is a problem with multiple calls before the packet is transmitted.  I solved this on my side with a simple delay to accommodate one line of text being printed at a time at 115,200 baud.  I'm sure there is a better way to fix this, but this works in this application for me.

Here is my function which wraps the USBUART_PutString()

/*-----------------------------------------------------------*/

/*-----------------------------------------------------------*/

int16 usbserial_putString(const char msg[])

{

    if(0 == USBUART_GetConfiguration())

        return -1;

    if (0==USBUART_CheckActivity())

        return -1;

    while(0 == USBUART_CDCIsReady())

       ;

       

    while(0 == USBUART_CDCIsReady())

       ;

    if (USBUART_CDCIsReady())

        USBUART_PutString(msg);

       

    CyDelay(1);// wait 1 millisecond

    return 1;

}

View solution in original post

0 Likes
3 Replies
Ekta_N
Moderator
Moderator
Moderator
750 replies posted First like given 250 solutions authored

Hello,

According to my understanding you are using a USBUART component in your project to send or receive serial data.

When you replug the USB port at of the CY8CKIT-059 kit, under PORTS and COM you see the USBUART device enumerated properly but do not observe any data in the Windows VM.

The same thing is working fine with Mac.

Since you are using Windows 7 it is possible for you to use unsigned driver. Install drivers for the device manually.

To do this:

1.Build the project

2. Goto the project directory(open the project in windows explorer) >Generated source > PSoC 5 > Here you will find USBUART_cdc.inf file

as shown in the image below.

pastedImage_0.png

Copy the path of the .inf fie.

3.Open the Device Manager, find the USBUART device.

4. Open the context menu and select Update Driver Software. Browse to the USBFS_UART.inf file from the project root directory as a driver.

Please let me know if the understanding of this issue is clear from my end as well as if following the above steps work for you.

Best Regards

Ekta

0 Likes

Thank you.  I tried that, but it told me the driver was already installed.

I then noticed that Windows 7 indicated a CDC interface was in error.  I checked, and No Driver was installed.  So I  installed, and got an error 10, could not start the device. (This was when using the Micro-USB connector on the CY8CKIT-059.)

  I uninstalled both the driver for the serial port, and the driver for the CDC device and rebooted.   I tried to re-install, and got a Com25 whic could not start, and a Com22 which would not communicate, and now locks up any application that tries to access.

  Since I am running under a VM, I checked, and found an old snapshot.  I went back to that snapshot, and plugged in the USBUART.  It started loading from Windows Update and installed a USB-Serial Composite device, a CDC Communication Interface, and a CDC Data Interface.  The USB-Serial Composite device installed immediately.  The other two devices are still "Searching Windows Update" a few minutes later.    The CDC Data Interface finally said "No Driver Found"  The CDC Communications Interface finally found a driver, and started searching for a Virtual Serial Port Device driver 00.

Everything now comes up ready except for the CDC Data interface.  The driver in the folder you suggested will not install the CDC Data interface.

Unfortunately, the serial port locks up Tera Term when plugged in.  This is the same Issue I started having recently.  I will try something different.

0 Likes

I went through the steps here: PSoC5LP USBUART, signed driver?

That did not work with 0x4b4 and 3 as USBUART parameters.  After 4 hours of installing, removing, rebooting, uninstalling, following different suggestions on the internet, with nothing from the Cypress community or internet at large working, I decided to uninstall and delete the drivers and reboot (without devices plugged in).

I went back to the USBUART and deleted USBUART, and put it back into the Schematic.  I rebuilt.  I plugged in the Kitprog, and all the drivers had to be re-installed.  They installed successfully. 

I then plugged in the USBUART and interrupted its install from Windows Update.  I pointed it to the driver file in the PSOC directory:  ProjectName.cysdn\Generated_Source\PSOC5 and installed that unsigned driver (under windows 7).

Now, the KitProg USBUART shows up in the serial port list, and the new USBUART shows up.  I connected to it with Tera Term Pro, and the system does not lock up now.

One problem I saw, was if you use USBUART_PutString(string), there is a problem with multiple calls before the packet is transmitted.  I solved this on my side with a simple delay to accommodate one line of text being printed at a time at 115,200 baud.  I'm sure there is a better way to fix this, but this works in this application for me.

Here is my function which wraps the USBUART_PutString()

/*-----------------------------------------------------------*/

/*-----------------------------------------------------------*/

int16 usbserial_putString(const char msg[])

{

    if(0 == USBUART_GetConfiguration())

        return -1;

    if (0==USBUART_CheckActivity())

        return -1;

    while(0 == USBUART_CDCIsReady())

       ;

       

    while(0 == USBUART_CDCIsReady())

       ;

    if (USBUART_CDCIsReady())

        USBUART_PutString(msg);

       

    CyDelay(1);// wait 1 millisecond

    return 1;

}

0 Likes