- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm using this source https://community.infineon.com/t5/USB-superspeed-peripherals/CX3-Update-firmware-in-SPI-flash-over-H...
to update over HID, its totally working fine in USB 3.0, when I add HID interface for 2.0 in descriptors and plug it in 2.0, I'm facing some errors,
my DMA is resetting, what's the problem with DMA when I use HID in USB 2..0?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
The following log:
USB setup CB:SET_CUR:GetEP0Data Err = 0x51
Indicates that the transaction has already been cancelled. It could be due to a new control request being received by the device or due to a USB reset. As you might be knowing, the UVC application issues a sequence of commands over the control endpoint to control the video transfer. The HID application also sends multiple commands to perform firmware update. This is also done using the control endpoint. Also, you have the video stream also running in parallel and the HID interface descriptor also has an additional interrupt endpoint defined in it. The USB bandwidth may not be sufficient to support all these transfers. This could be the reason for the failure to be seen in USB 2.0 mode.
This is also evident from the fact that you see Commit buffer failures. This error is usually seen when the host is slow in clearing the data available within FX3 endpoints. Please try with the attached firmware and let me know if you are still facing the issue.
Note: I have tested this project at my end and it works well without any issues in USB 2.0 mode.
Jayakrishna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Please let me know if you are able to update the firmware correctly. Also, does your end requirement needs USB 2.0?
In addition to this, please check if the DMA Reset print occurs because of CyU3PDmaMultiChannelCommitBuffer () failure or because of the timer callback getting invoked (CyCx3AppProgressTimer)
Jayakrishna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@JayakrishnaT_76 I'm even unable to update through 2. using HID sample app
while uploading I'm getting like this
................................first setoutput report failed,
and some times without any DMA buffer error, I get Error in USB as
USB setup CB:SET_CUR:GetEP0Data Err = 0x51
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
And I'm getting Error as Unable to commit buffer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
when I try to access it with AMCAP I got error as shown below
on that Time I get this log USB setup CB:SET_CUR:GetEP0Data Err = 0x51
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The reason for DMA Commit buffer error is CY_U3P_ERROR_INVALID_SEQUENCE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
The following log:
USB setup CB:SET_CUR:GetEP0Data Err = 0x51
Indicates that the transaction has already been cancelled. It could be due to a new control request being received by the device or due to a USB reset. As you might be knowing, the UVC application issues a sequence of commands over the control endpoint to control the video transfer. The HID application also sends multiple commands to perform firmware update. This is also done using the control endpoint. Also, you have the video stream also running in parallel and the HID interface descriptor also has an additional interrupt endpoint defined in it. The USB bandwidth may not be sufficient to support all these transfers. This could be the reason for the failure to be seen in USB 2.0 mode.
This is also evident from the fact that you see Commit buffer failures. This error is usually seen when the host is slow in clearing the data available within FX3 endpoints. Please try with the attached firmware and let me know if you are still facing the issue.
Note: I have tested this project at my end and it works well without any issues in USB 2.0 mode.
Jayakrishna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
present out of 2 problems one problem is solved, i.e, I'm able to update firmware with HID sample app, but still I'm unable to get Images, either I'm getting USB setup CB:SET_CUR:GetEP0Data Err = 0x51 or getting error with DMA.
and what are the changes You did to make it good in updating firmware, and Thanks for support @JayakrishnaT_76
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Subhash,
I just removed the Interrupt endpoint descriptor in the HID interface descriptor as it was not used. Regarding the DMA error and GetEp0 error, please let me know if it occurs while updating the firmware or not.
Jayakrishna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The same errors are occurring when I try to access with AMCAP while the firmware is updating, and as said firmware updating successfully.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
So, I understand that the issue occurs while the firmware is updated. This is possible because of the lack of bandwidth available for the USB transfers. As mentioned before the commit buffer fails with invalid sequence error when the host is slow in issuing the IN tokens to clear the data associated with the IN endpoint. So, there are chances for you to see occasional pause in the video stream or commit buffer failures in USB 2.0 mode.
I tested the project at my end with the Windows Camera Application. It was streaming the video while the firmware update was being done. Can you please check with Windows Camera Application and let me know the result? If you still face issues, then can you please test with a different PC?
Jayakrishna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In windows camera I'm not getting any Error on USB setup CB:SET_CUR:GetEP0Data Err = 0x51 but getting error on DMA and I tested with another laptop and I got camera switching failed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
As mentioned before, the error seems to be occurring due to slowness of host in clearing the IN endpoint of the video interface. This is possible while the firmware update occurs in USB 2.0 mode due to insufficient bandwidth and handling of the control requests for firmware update. You could be seeing occasional pauses in the video stream. It should stream the video properly when the firmware update is not done.
You can try modifying the HID host application by adding a small delay in between sending the firmware chunks.
Jayakrishna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks, @JayakrishnaT_76 I'm able to get now but at some rare occasions, I'm gettig error about EP0 error
Thanks
Subhash
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
You can further try adjusting the delay between sending firmware chunks on the host application side. But, this could make the firmware update slow.
Also, the spi writes currently in firmware is made use in register mode. You can try to port the code to make use of DMA mode by referring to the following SDK example project:
C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\serialif_examples\cyfxusbspidmamode
Jayakrishna