CX3 not responding to HID callback function

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

cross mob
Rakesh
Level 3
Level 3
25 replies posted 10 questions asked 50 sign-ins

Hi infineon team,
we have a code that perfectly works on EZ-USB 1.3.1 version. now we try to build it using EZ-USB 1.3.4 version.
we faced memory related issues but we solved it and build was successful device enumerated as camera and HID as well . device is working fine.
the problem is when the HOST application is sending HID request to the device through the HID endpoint, the device didnt recogonise the request using HID callback function.
i have confirmed the request has been sent from the host application using protocol analyzer. But the request the was not detected by CX3 through HID call back function.
kindly help me to solve why CX3 is not receiving Request related to HID.

Note:
1) The HID call back was register successfully.we confirmed using CyU3PReturnStatus_t API.
2) Application is sending HID request.we confirmed using protocol analyzer.
3) The same code is working fine when build on 1.3.1 version.so i dont think there is logical mistake in code (like handling Callback functions).

0 Likes
1 Solution

Hello,

From the code, I understand that you have configured the endpoints for the HID interface and created the DMA channels for the same before the API CyU3PConnectState () is called. We recommend to perform these tasks only after the CY_U3P_USB_EVENT_SETCONF event is received.

So, please try configuring the endpoints and creating the DMA channels inside the function CyFxUVCApplnStart () as done for the UVC application and let me know if you still face this issue.

Best Regards,
Jayakrishna

View solution in original post

0 Likes
7 Replies
JayakrishnaT_76
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hello,

Please let me know the following so that we can debug the issue:

1. "The HID call back was register successfully.we confirmed using CyU3PReturnStatus_t API."

Please let me know what exactly was meant by the above line? Does it mean that DMA callback for HID channel? If no, then please elaborate so that we can understand the problem better. Was the callback invoked?

2. Can you please share the Wireshark trace for us to check?

3. Please confirm that the requests are sent to the HID endpoint and not the control endpoint.

4. I hope you have a UVC interface in addition to the HID interface. Please let me know if the UVC interface is working fine or not when the issue occurs.

Is it possible to share the source code for us to check?

Best Regards,
Jayakrishna
0 Likes
lock attach
Attachments are accessible only for community members.

Hi jayakrishna,

1. "The HID call back was register successfully.we confirmed using CyU3PReturnStatus_t API."

        Yes,DMA callback for HID channel was registered successfully. in the below image cyu3pdmachannelcreate() returned success status.

Rakesh_0-1645003275718.png

2. Can you please share the Wireshark trace for us to check?

     >>>I have attached the log of protocol analyzer.kindly verify it.

3. Please confirm that the requests are sent to the HID endpoint and not the control endpoint.

    >>>>From the attached log we can confirm request sent to HID endpoint. i attached descriptor file also.

Rakesh_1-1645005458307.png

 

4. I hope you have a UVC interface in addition to the HID interface. Please let me know if the UVC interface is working fine or not when the issue occurs.

     >>> yes ,we have UVC interface in addition to HID interface and it is working fine.

0 Likes

Hello,

Thank you for sharing the details.

From the data shared, I understand that you are trying to operate the device in High speed mode. Please correct me if my understanding is wrong.

Please let us know if it is possible to share the complete project for us to review. Also is it possible to share Wireshark traces instead of the traces shared currently?

In addition to this, please let us know how did you confirm that the DMA callback function for the HID endpoint is not invoked?

Best Regards,
Jayakrishna
0 Likes
lock attach
Attachments are accessible only for community members.

Hi jayakrishna,

Thanks for your quick reply.

Below i attached the complete project code.

Note:

1) The device will operate in both Superspeed and highspeed modes.

2) In the given code my issue is void CyFxSlFifoHIDDmaCallback() callback function is not invoked. 

3) If the below code is build using 1_3_1 SDK version,  callback function void CyFxSlFifoHIDDmaCallback() is invoked.

kindly provide a solution to this issue.

 

0 Likes

Hello,

From the code, I understand that you have configured the endpoints for the HID interface and created the DMA channels for the same before the API CyU3PConnectState () is called. We recommend to perform these tasks only after the CY_U3P_USB_EVENT_SETCONF event is received.

So, please try configuring the endpoints and creating the DMA channels inside the function CyFxUVCApplnStart () as done for the UVC application and let me know if you still face this issue.

Best Regards,
Jayakrishna
0 Likes

Hi jayakrishna,

The above method you mentioned works for me. but can you explain why it is necessary to configure and create DMA channel inside CyFxUVCApplnStart ()

 

0 Likes

Hello,

Please refer to the following KBA to understand the reason for creating the channel inside CyFxUVCApplnStart (): 

https://community.infineon.com/t5/Knowledge-Base-Articles/FX3-USB-transfers-do-not-occur-even-after-...

Best Regards,
Jayakrishna
0 Likes