- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
After accessing the Android camera software, CX3_DMA_RESET_EVENT has been fed back all the time, resulting in AppInStop and AppInStart. Could you please tell me which parameters are needed to avoid this problem? Thank you very much!
Solved! Go to Solution.
- Labels:
-
USB Superspeed Peripherals
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Edited:
Hello,
CyU3PDmaMultiChannelCommitBuffer usually fails with error code 0x47 , when USB host is slow to consume the data from the DMA buffers of CX3 and thus the DMA buffer overflow condition is seen
Please let me know the video resolution, bits/pixel and FPS of the video being streamed.
Following to avoid all DMA buffers from being filled up:
- Allocate the maximum possible memory to the DMA buffer. - Please let us know the DMA buffer size used currently before changing it.
- Configure horizontal blanking of the image sensor as high as possible (to do this vertical blanking can be reduced thereby maintaining same frame rate). While doing this make sure that vertical blanking does not go below ~500 us.
Please try streaming the video using CameraFi and CameraFi2 applications and let me know if it works.
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Please confirm the reason of CX3_DMA_RESET_EVENT - Is the event set due CyU3PDmaMultiChannelCommitBuffer failure?
If yes, it usually happens when the host is slower to consume the data from CX3. Can you please let me know if the default settings of OV5640 (i.e. as in FX3 SDK) are being used? or are the sensor setting modified ?
Please share UART debug prints and USB traces (using USB software analyzer like Wireshark) while video is being streamed.
Also, refer to this thread Solved: CX3 -Android - Cypress Developer Community for the host application that was used to test video streaming using CX3 on android
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,Rashi
We used two Android camera software to get the log printed by the CY3065 serial port.The first log is correct, as follows:
EnterSuspendMode Status = 0x0, Wakeup reason = 0x8
bRType = 0xA1, bRequest = 0x81, wValue = 0x100, wIndex = 0x1, wLength= 0x22
bRType = 0xA1, bRequest = 0x82, wValue = 0x100, wIndex = 0x1, wLength= 0x22
bRType = 0xA1, bRequest = 0x83, wValue = 0x100, wIndex = 0x1, wLength= 0x22
bRType = 0x21, bRequest = 0x1, wValue = 0x100, wIndex = 0x1, wLength= 0x22
bRType = 0xA1, bRequest = 0x81, wValue = 0x100, wIndex = 0x1, wLength= 0x22
bRType = 0xA1, bRequest = 0x81, wValue = 0x100, wIndex = 0x1, wLength= 0x22
bRType = 0xA1, bRequest = 0x82, wValue = 0x100, wIndex = 0x1, wLength= 0x22
bRType = 0xA1, bRequest = 0x83, wValue = 0x100, wIndex = 0x1, wLength= 0x22
bRType = 0x21, bRequest = 0x1, wValue = 0x100, wIndex = 0x1, wLength= 0x22
bRType = 0xA1, bRequest = 0x81, wValue = 0x100, wIndex = 0x1, wLength= 0x22
bRType = 0x21, bRequest = 0x1, wValue = 0x200, wIndex = 0x1, wLength= 0x22
AplnStrt:SMState = 0x2
bRType = 0x2, bRequest = 0x1, wValue = 0x0, wIndex = 0x83, wLength= 0x0
The second log is incorrect as follows:
AppInit:GpifSMStart passed
AppInit:GpifSMStart passed
EnterSuspendMode Status = 0x0, Wakeup reason = 0x8
bRType = 0xA1, bRequest = 0x81, wValue = 0x100, wIndex = 0x1, wLength= 0x22
bRType = 0xA1, bRequest = 0x82, wValue = 0x100, wIndex = 0x1, wLength= 0x22
bRType = 0xA1, bRequest = 0x83, wValue = 0x100, wIndex = 0x1, wLength= 0x22
bRType = 0xA1, bRequest = 0x81, wValue = 0x100, wIndex = 0x1, wLength= 0x22
bRType = 0xA1, bRequest = 0x82, wValue = 0x100, wIndex = 0x1, wLength= 0x22
bRType = 0xA1, bRequest = 0x83, wValue = 0x100, wIndex = 0x1, wLength= 0x22
bRType = 0x21, bRequest = 0x1, wValue = 0x100, wIndex = 0x1, wLength= 0x22
bRType = 0xA1, bRequest = 0x81, wValue = 0x100, wIndex = 0x1, wLength= 0x22
bRType = 0xA1, bRequest = 0x81, wValue = 0x100, wIndex = 0x1, wLength= 0x22
bRType = 0xA1, bRequest = 0x82, wValue = 0x100, wIndex = 0x1, wLength= 0x22
bRType = 0xA1, bRequest = 0x83, wValue = 0x100, wIndex = 0x1, wLength= 0x22
bRType = 0xA1, bRequest = 0x81, wValue = 0x100, wIndex = 0x1, wLength= 0x22
bRType = 0xA1, bRequest = 0x82, wValue = 0x100, wIndex = 0x1, wLength= 0x22
bRType = 0xA1, bRequest = 0x83, wValue = 0x100, wIndex = 0x1, wLength= 0x22
bRType = 0x21, bRequest = 0x1, wValue = 0x100, wIndex = 0x1, wLength= 0x22
bRType = 0xA1, bRequest = 0x81, wValue = 0x100, wIndex = 0x1, wLength= 0x22
bRType = 0x21, bRequest = 0x1, wValue = 0x200, wIndex = 0x1, wLength= 0x22
AplnStrt:SMState = 0x2
AplnStop:SMState = 0x5
AplnStrt:SMState = 0x1
AplnStop:SMState = 0x7
AplnStrt:SMState = 0x1
AplnStop:SMState = 0x7
AplnStrt:SMState = 0x1
AplnStop:SMState = 0x5
AplnStrt:SMState = 0x1
AplnStop:SMState = 0x7
AplnStrt:SMState = 0x1
AplnStop:SMState = 0x5
AplnStrt:SMState = 0x1
AplnStop:SMState = 0x7
AplnStrt:SMState = 0x1
AplnStop:SMState = 0x7
AplnStrt:SMState = 0x1
AplnStop:SMState = 0x7.......
The wrong phenomenon is the stop and start loop。。。。Please point out, which parameter setting is wrong...
Thank you very much!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Please let me know what are the changes done while capturing the first log and second log.
To debug the problem of commit buffer failure, please let me know the DMA buffer size (CX3_UVC_DATA_BUF_SIZE) used in the firmware and also share the CX3 configuration Tool snippet (.cycx file) as shown in the attached figure
Please let me know which android host application is used to stream the video
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Rashi,
many thx for your quick reply, and sorry for the wrong click on'accept' button , could you pls reopen the issue?
as you said, we got that dmacommit error, with a status=0x47
so any idea about this? on firmware side or on android app side should all ok,
regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Edited:
Hello,
CyU3PDmaMultiChannelCommitBuffer usually fails with error code 0x47 , when USB host is slow to consume the data from the DMA buffers of CX3 and thus the DMA buffer overflow condition is seen
Please let me know the video resolution, bits/pixel and FPS of the video being streamed.
Following to avoid all DMA buffers from being filled up:
- Allocate the maximum possible memory to the DMA buffer. - Please let us know the DMA buffer size used currently before changing it.
- Configure horizontal blanking of the image sensor as high as possible (to do this vertical blanking can be reduced thereby maintaining same frame rate). While doing this make sure that vertical blanking does not go below ~500 us.
Please try streaming the video using CameraFi and CameraFi2 applications and let me know if it works.
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hello,Rashi
DMA buffer size :0x5ff0 + 12 + 4; buffer count = 4;
Default library configuration for sensor configuration。
Thank you very much!
Regards,
wqf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Thank you for confirming that you are using the default OV5640 firmware from FX3 SDK.
Please try streaming the video using CameraFi and CameraFi2 applications and let me know if it works. Also, let me know on which Android version is the application being tested. Is the problem seen on different android versions?
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hello,
Rashi
Thank you for your answer。CameraFi works, no problem。But,the app we wrote didn't work properly。We used a android UVC library that we downloaded from the Internet。Is it because the Android UVC library we downloaded is not compatible with the hardware?Is it convenient for you to provide a version of the Android UVC library?Thank you very much!
Regard,
WQF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Glad to hear that the commit buffer failure problem is resolved when CameraFi application is used on the android.
Is it because the Android UVC library we downloaded is not compatible with the hardware
>> The commit buffer failures are generally seen when the USB host is slow to consume the data from the CX3's DMA buffers. The problem could be in the scheduling of the USB requests from the host application.
Is it convenient for you to provide a version of the Android UVC library?
>> As mentioned in this thread Solved: CX3 -Android - Cypress Developer Community , we have tested CX3 with CameraFi application for USB 2.0. We do not have Android UVC library.
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Rashi
Thank you for your answer.
Now we see the message printed on the hardware serial port: CX3_DMA_RESET_EVENT ERR =0x47.
Would you like to know where to modify the parameters of the hardware to avoid this error? Currently, the total size of the DMA Buffer is 192KB, which should not be increased.
Regards,
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Now we see the message printed on the hardware serial port: CX3_DMA_RESET_EVENT ERR =0x47.
>> Please let me know if the problem was resolved using CameraFi app. In your earlier response, you mentioned that the problem was resolved using CameraFi app. When is the error seen now?
Would you like to know where to modify the parameters of the hardware to avoid this error?
>> Which host application is being used when this error is seen? Is the device used as USB 2.0 or USB 3.0 device?
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Rashi,
Thank you for your answer.
There is no such error when using cameraafi, but this error will occur when using our own APP. We are connected to USB3.0, this error will disappear when the resolution is set to 640P. This error will occur if you set it to 720P or 1080P. Some users have asked questions and suggested increasing the size of DMA_BUF, but our current software setup looks like this: buf_size= 24KB (5ff0+16),buf_count=4,The size should not be able to expand?
Regards,
WQF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
We are connected to USB3.0, this error will disappear when the resolution is set to 640P. This error will occur if you set it to 720P or 1080P
>>Yes. As discussed earlier the issue is seen when USB host is slow to consume the DMA buffers of CX3 which in turn leads to DMA overflow condition.
Please try with the following modifications
#define CX3_UVC_DATA_BUF_SIZE (0x8FD0)
#define CX3_UVC_STREAM_BUF_COUNT (3)
// Modification in /* UVC Probe Control Settings */ //
0x00, 0x90, 0x00, 0x00, /* No. of bytes device can rx in single payload: 36KB */
Rashi