Problem with USB HID General Data Transfer

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

cross mob
lock attach
Attachments are accessible only for community members.
LeYu_281131
Level 3
Level 3

I want to use communication with USB HID.

so, I tried "AN82072", almost work is fine.

but, send data to PSoC from PC is the problem to me.

I made c# application to test data transfer between PC and PSoC.

but sometimes the transfer is failed.

I also tried to find the problem with the Bus Hound program.

bushound.JPG

but I can not find any problem with the program, I think the data was sent to PSoC but PSoC does not receive the data.

so, PSoC does not send data to PC, 10 times.

I also tried with CY8CKIT-050 but has same problem.

This is My problem.

I attached my files, PSoC project and C# Application.

please refer the files and give me any advise to solve this problem.

USB_HID_Test.gif

Test Environment

CY8CKIT-030

PSoC Creator 4.1 Update 1

Windows 10 Pro 1803

Visual Studio 2017

CyUSB.dll - 3.4.7.0

0 Likes
1 Solution

Discussion moved to How to do USB HID communication with PSoC5LP?

Solution summary: Cypress HID Classes are no longer supported on Windows 10. CYUSB3.sys previously had support for HID Classes but now it is obsoleted. Please use the Windows HID libraries to develop your applications.

Regards,
Dheeraj

View solution in original post

0 Likes
10 Replies
himam_31
Employee
Employee
50 likes received 25 likes received 10 likes received

Hello,

Do you have actual USB Analyser hardware? If yes can you check if the device is NACKing for the IN tokens?

Did you check the C# application in different version of Windows? Are you facing same issue?

Thanks,

Hima

0 Likes

Dear Hima

Thank you for your advise.

Unfortunately, I do not have actual USB Analyzer hardware.

but I can try with different version of Windows.

I think "Windows 7" or "Windows Vista" is the different version of Windows, you mentioned.

am I right?

Thanks,

Yusang

0 Likes

Dear Hima

I tested the USB HID test with "Windows 7 Ultimate".

but I got the same result.

maybe Windows version is not the reason of the problem.

If you have any idea, please let me know.

Thank you again

Yusang

0 Likes

Dear Hima

Today, I have an analysis USB packet with hardware analyzer.

before you mentioned NACKing for IN token, and I checked just now.

So, If you have any advice to solve this problem, Please let me know.

0 Likes

Hello,

Can you add the following code snippet to the main loop and try again.

/* Place your application code here. */

        if(USBFS_IsConfigurationChanged() != 0)

            {

                if(USBFS_GetConfiguration() != 0)

                {

                USBFS_EnableOutEP(OUT_ENDPOINT);

                }

            }

Please refer to Troubleshooting PSoC® 3, PSoC 4 L-Series, and PSoC 5LP USB Designs – KBA210620

for more details on why this is required.

Thanks,

Hima

0 Likes

Dear HimaM_31

Thank you for your help.

but The Problem still exists even I added the cord.

And I found that the problem related with Windows version.
I am sorry about this situation before the experiment was wrong.

I prepared clean Windows 7(64bit) and Windows 10(64bit).

And I downloaded PSoC firmware with "AN82072" that Cypress supported.
I used C# application that contained in "AN82072" for my Test.

when I test with Windows 7, it is work perfectly.
but when I test with Windows 10, it is not working perfectly, To send the data to PSoC, I should click the button several times.

If you have any opinion to solve the problem, Please let me know.

Thank you again about your help.

0 Likes

Discussion moved to How to do USB HID communication with PSoC5LP?

Solution summary: Cypress HID Classes are no longer supported on Windows 10. CYUSB3.sys previously had support for HID Classes but now it is obsoleted. Please use the Windows HID libraries to develop your applications.

Regards,
Dheeraj

0 Likes
LeYu_281131
Level 3
Level 3

I trying to make the environment as AN82072.

I am analysis the sample project that uploaded by Cypress for AN82072.

the sample project seems to be written by PSoC Creator 3.3 SP2.

so, I did compile and upload the firmware using PSoC Creator 3.3 SP2.

but Sample system is not working well.

In this time I am using CY8CKIT-050 to avoid change some code.

but To change PWM Duty Cycle, I have to push the "Update" button several times.

If you have any experience with this problem, Please let me know.

0 Likes

Hi Yusang,

I am not experiencing any issue like I have to press "Update" button several times as mentioned  with AN82072 on Windows7 with CY8CKIT-050 on PSoC Creator3.3 SP2

0 Likes

Dear AnkitaS_51

Thank you for your reply.

Currently, My Test environment is as below

- Windows 10, PSoC Creator3.3 SP2, Visual Studio 2017 community, CY8CKIT-050

so, Will try with Windows 7 in soon.

and I have a question for you.

Today, I tested the USB protocol with hardware Analyzer.

There are a lot of NAK for IN token.

capture.PNG

How Can I debug for the NAK in PSoC Creator?

If you have any advice, please let me know.

0 Likes