- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HI:
UVC+HID composite device, UVC transmission image, HID output gyro data, gyroscope data output rate of 1KHZ, interrupt wakeup FX3 read data, but found that there will be dropped frames, I would like to ask, whether to try for the image and gyro Loss of data due to interrupt conflicts, if so, how to modify the interrupt priority of external interrupts
The abscissa represents the gyroscope frame count and the ordinate represents the time interval between two adjacent frames
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
It is not recommended to change the priority associated with the various interrupt sources with FX3.
Buffer over/under run issue might be happened in FX3 DMA architecture.
This issue is often observed in systems where the GPIF II interface which collects the data from external processor / FPGA / Image sensor which has no flow-control.
Here the GPIF block in FX3 writes the received data to the internal buffers continuously without checking it availability, so if the USB host is not capable of reading data in a timely fashion buffer over-run will happen in the GPIF socket & it will end up in the buffer loss & DMA channel crash.
Following are some good design practices to avoid issue if it happened:
1. DMA buffering:
a, Try to utilize the maximum DMA buffering in many to one DMA architecture.
b, Do not use very large DMA buffers, make it a multiple of max packet size * max burst length. i.e. max packet zise = 1024, Burst = 16, Then make the DMA buffer size 16 * 1024 / 16 * 1024 * 2.
c, Always use maximum USB 3.0 Bursts.
2. Try to minimize the short packets / ZLPs in the system because this will cause the host application xferdata queue to terminate instantly.
3. It is not recommended to add any delay causing elements (Like Debug prints, Buffer parsing & manipulation) in the DMA callback.
If it is necessary do it In the application thread using CyU3PDmaChannelGetBuffer() & CyU3PDmaChannelCommitBuffer() APIs with minimal processing.
4. It is also dependent on the Power modes in the PC & the current CPU load, Always use High Performance mode in PC.
5. Disabling LPM features improves the system performance.
6. Always use the latest version of the USB 3.0 host controller drivers.
If you have any update, kindly let me know.
Best regards,
Hirotaka Takayama
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
To clarify situation (big picture) as follows.
[UVC+HID composite device] -> (UVC transmit image data, HID transmit gyro data) -> [FX3] -> [Host PC]
Gyroscope occasionally lost frames when sends between FX3 and Host PC.
FYI: If you use multiple threads on FX3, please confirm these threads access different endpoint.
(If different threads access same endpoint, the thread-safe does not apply.)
If you get FX3 status when the gyroscope occasionally losts frames, it might help to solve this problem.
Best regards,
Hirotaka Takayama
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
It is not recommended to change the priority associated with the various interrupt sources with FX3.
Buffer over/under run issue might be happened in FX3 DMA architecture.
This issue is often observed in systems where the GPIF II interface which collects the data from external processor / FPGA / Image sensor which has no flow-control.
Here the GPIF block in FX3 writes the received data to the internal buffers continuously without checking it availability, so if the USB host is not capable of reading data in a timely fashion buffer over-run will happen in the GPIF socket & it will end up in the buffer loss & DMA channel crash.
Following are some good design practices to avoid issue if it happened:
1. DMA buffering:
a, Try to utilize the maximum DMA buffering in many to one DMA architecture.
b, Do not use very large DMA buffers, make it a multiple of max packet size * max burst length. i.e. max packet zise = 1024, Burst = 16, Then make the DMA buffer size 16 * 1024 / 16 * 1024 * 2.
c, Always use maximum USB 3.0 Bursts.
2. Try to minimize the short packets / ZLPs in the system because this will cause the host application xferdata queue to terminate instantly.
3. It is not recommended to add any delay causing elements (Like Debug prints, Buffer parsing & manipulation) in the DMA callback.
If it is necessary do it In the application thread using CyU3PDmaChannelGetBuffer() & CyU3PDmaChannelCommitBuffer() APIs with minimal processing.
4. It is also dependent on the Power modes in the PC & the current CPU load, Always use High Performance mode in PC.
5. Disabling LPM features improves the system performance.
6. Always use the latest version of the USB 3.0 host controller drivers.
If you have any update, kindly let me know.
Best regards,
Hirotaka Takayama
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi : How to completely disable the low power mode?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can use CyU3PUsbLPMDisable() API to prevent FX3 from entering U1/U2 states.
Indiscriminate use of this function can result in USB compliance test failures. Please ensure that the LPM functionality is enabled every time an USB connect or reset event is received. This can be disabled again after ensuring that the device is functioning in a performance critical mode.
You can check this API usage on "EZ-USB® FX3 SDK Firmware API Guide" p528.
http://www.cypress.com/system/files/document/files/FX3APIGuide_0.pdf
This forum thread also helpful you to use related API.
Low Power Mode Request From Host
Best regards,
Hirotaka Takayama