6 Replies Latest reply on Aug 29, 2017 5:34 AM by MaAr_2545856

    FX3 + Interrupt Endpoint



      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?



        • 1. Re: FX3 + Interrupt Endpoint

          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.

          • 2. Re: FX3 + Interrupt Endpoint
                    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.   
            • 3. Re: FX3 + Interrupt Endpoint

              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.

              • 4. Re: FX3 + Interrupt Endpoint



                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.

                1 of 1 people found this helpful
                • 5. Re: FX3 + Interrupt Endpoint

                  Thanks for the help . Now it got worked.

                  • 6. Re: FX3 + Interrupt Endpoint

                    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.