FX3 + Interrupt Endpoint

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

cross mob
Anonymous
Not applicable

Hello,

   

I have setup appropriate usb descriptors for interrupt endpoint and PC can detect it as the control center shows everything as expected. When I am sending the data from pc, I am not sure how to extract it in the firmware. Which event shall I expect and which api need to be used to get the data? Can anybody point me to the example or documentation?

   

Regards.

0 Likes
6 Replies
Anonymous
Not applicable

It depend on your application. I suppose you are trying to send data from PC to FX3, correct? As you have mentioned that you already have the descriptors ready, next you can refer to the USBBulkSourceSink firmware in FX3 SDK. It contains 2 DMA channels, one to receive data from USB host to the FX3-CPU. You will also need to create a similar channel with your interrupt endpoint as the producer. Once you have it, whenever the host sends data, you will receive it in the DMA channel callback or CPU as per your wish. Please go through the above mentioned firmware, although it uses bulk data transfer, but you can get an idea how to create DMA channel get the data handle.

0 Likes
Anonymous
Not applicable
        Thanks Nishant for the help. I can now copy the data in DMA callback with the function CyU3PDmaChannelGetBuffer. After that I am flushing the DMA buffer with CyU3PDmaChannelDiscardBuffer. I hope, am doing it correctly because without it I see an error 997.   
0 Likes

I want to test the firmware image of the USBDebug example . I tried with Control Center  "Interrupt in endpoint(0x81)".  "Transfer Data-IN"  and "Transfer Data-IN"  button, I got error " INTERRUPT IN transfer INTERRUPT IN transfer failed with Error Code:997 "  and CONTROL OUT transfer CONTROL OUT transfer failed with Error Code:997.  what settings I should do to run the example. I tried with 1.3.1 also it didnt work for me.

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hi!,

Could you tell what is the value you have entered in 'Bytes to transfer' field. Is it 128?

I have attached the screenshot of the Control Center showing the Interrupt IN transfer.

When you send a vendor command 0xE0 over the Control endpoint, the device resets (In the firmware, CyU3PDeviceReset() API is called when 0xE0 is received). Hence, the Control OUT transfer is failing.

Thanks for the help . Now it got worked.

0 Likes
MaAr_2545856
Level 4
Level 4
5 sign-ins 5 solutions authored First solution authored

I am facing the same issue sometimes. I burned the same image for which I got the output but after sometime I am not getting the output. what could be the issue. is it related to the hardware or my PC is not accepting the data.

Capture1.PNG

0 Likes