CyCx3UvcAppUSBEventCB never executed

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

cross mob
MaSt_4567191
Level 4
Level 4
10 likes given 5 likes given First like received

as per subject, the event is registered by

    CyU3PUsbRegisterEventCallback(CyCx3UvcAppUSBEventCB);

but never executed. AFIK this means no USB event is triggerered by the system so the various booleans like glMipiActive, glIsConfigured, glIsStreamingStarted etc. are left to false ...

I connected a MIPI stream to the CX3 inputs (the connection is a bit noisy since I bypassed an FPGA which merges two sensors into one) just to check the USB

Can you address a way ti debug this? I guess the MIPI peripheral deliver some interrupt to the CPU as soon as a valid stream is detected right?

Thanks much

0 Likes
1 Solution

Hello Marco,

Please make use of the following code snippet for implementing device reset using the API CyU3PDeviceReset(CyFalse); inside the event callback.

pastedImage_0.png

After programming denebola kit with the .img file, please open the host application and start streaming. If you see that the device is reset, that is, it enumerates as a bootloader device in control center, then the callback is triggered. Otherwise, it is not triggered.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna

View solution in original post

45 Replies

Thank you very much for your reply

As a further question, for the time being I am happy with the behaviour except for some limitation i.e. if I stop VLC and play again the streaming does not recover. Am I supposed to implement something in the example design for this? Next step is to turn the application in a professional piece of software (reliable, controllable etc.)

Regards

0 Likes

Hello,

According to my understanding, you are able to stream the video properly using VLC media player at the beginning. But when you close and reopen VLC, you are not able to do the same properly. Please correct me if I'm wrong. Also, please share the following so that I can understand the problem and find a solution quicker.

1. The debug logs taken from a particular point of time when the video is streaming properly to the point where it stops streaming when you close and reopen the application. This can be used to understand what exactly is happening when you close and reopen the application.

2. Please let me know if the FPGA and CX3 are programmed when you close and reopen the VLC.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna
0 Likes

Hello Jayakrhisna

I am back. We struggled and succeeded to get a 1280x720 MIPI flow out of the Lattice Crossilink which merges two 640x720 MIPI input from a pair of aptinas.

What worked with the MIPI repeater (1 sensor@1280x720) of course does not work any longer, according to the murphys' law

In principle the MIPI stream at the input of the CX3 is the same resolution, encoding, fps etc.)

The UVC is correctly enumerated but as soon as I select the capture device on the VLC combo box I got a message

"the device is disconnected because its type is not supported "

After sensor configurations and VLC device selection I got these messages

bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x0, wLength= 0x0

StpCB:In SET_FTR 0::1

bRType = 0x81, bRequest = 0x0, wValue = 0x0, wIndex = 0x0, wLength= 0x2

bRType = 0x81, bRequest = 0x0, wValue = 0x0, wIndex = 0x0, wLength= 0x2

bRType = 0x81, bRequest = 0x0, wValue = 0x0, wIndex = 0x0, wLength= 0x2

bRType = 0x81, bRequest = 0x0, wValue = 0x0, wIndex = 0x0, wLength= 0x2

bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x100, wLength= 0x0

StpCB:In SET_FTR 0::1

bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x0, wLength= 0x0

StpCB:In SET_FTR 0::1

bRType = 0xA1, bRequest = 0x87, wValue = 0x1400, wIndex = 0x100, wLength= 0xA

bRType = 0xA1, bRequest = 0x81, wValue = 0x200, wIndex = 0x0, wLength= 0x1

bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x100, wLength= 0x0

StpCB:In SET_FTR 0::1

bRType = 0x81, bRequest = 0x0, wValue = 0x0, wIndex = 0x0, wLength= 0x2

bRType = 0x81, bRequest = 0x0, wValue = 0x0, wIndex = 0x0, wLength= 0x2

bRType = 0x81, bRequest = 0x0, wValue = 0x0, wIndex = 0x0, wLength= 0x2

bRType = 0x81, bRequest = 0x0, wValue = 0x0, wIndex = 0x0, wLength= 0x2

bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x100, wLength= 0x0

StpCB:In SET_FTR 0::1

bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x0, wLength= 0x0

StpCB:In SET_FTR 0::1

bRType = 0x81, bRequest = 0x0, wValue = 0x0, wIndex = 0x0, wLength= 0x2

bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x100, wLength= 0x0

StpCB:In SET_FTR 0::1

bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x0, wLength= 0x0

StpCB:In SET_FTR 0::1

bRType = 0xA1, bRequest = 0x87, wValue = 0x1400, wIndex = 0x100, wLength= 0xA

bRType = 0xA1, bRequest = 0x81, wValue = 0x200, wIndex = 0x0, wLength= 0x1

bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x100, wLength= 0x0

StpCB:In SET_FTR 0::1

bRType = 0x81, bRequest = 0x0, wValue = 0x0, wIndex = 0x0, wLength= 0x2

bRType = 0x81, bRequest = 0x0, wValue = 0x0, wIndex = 0x0, wLength= 0x2

bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x100, wLength= 0x0

StpCB:In SET_FTR 0::1

bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x0, wLength= 0x0

StpCB:In SET_FTR 0::1

bRType = 0x81, bRequest = 0x0, wValue = 0x0, wIndex = 0x0, wLength= 0x2

bRType = 0x81, bRequest = 0x0, wValue = 0x0, wIndex = 0x0, wLength= 0x2

bRType = 0x81, bRequest = 0x0, wValue = 0x0, wIndex = 0x0, wLength= 0x2

bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x100, wLength= 0x0

StpCB:In SET_FTR 0::1

bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x0, wLength= 0x0

StpCB:In SET_FTR 0::1

bRType = 0xA1, bRequest = 0x87, wValue = 0x1400, wIndex = 0x100, wLength= 0xA

bRType = 0xA1, bRequest = 0x81, wValue = 0x200, wIndex = 0x0, wLength= 0x1

bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x100, wLength= 0x0

StpCB:In SET_FTR 0::1

bRType = 0x81, bRequest = 0x0, wValue = 0x0, wIndex = 0x0, wLength= 0x2

bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x100, wLength= 0x0

StpCB:In SET_FTR 0::1

bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x0, wLength= 0x0

StpCB:In SET_FTR 0::1

bRType = 0xA1, bRequest = 0x87, wValue = 0x1400, wIndex = 0x100, wLength= 0xA

bRType = 0xA1, bRequest = 0x81, wValue = 0x200, wIndex = 0x0, wLength= 0x1

bRType = 0x81, bRequest = 0x0, wValue = 0x0, wIndex = 0x0, wLength= 0x2

bRType = 0x81, bRequest = 0x0, wValue = 0x0, wIndex = 0x0, wLength= 0x2

bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x100, wLength= 0x0

StpCB:In SET_FTR 0::1

bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x0, wLength= 0x0

StpCB:In SET_FTR 0::1

bRType = 0x81, bRequest = 0x0, wValue = 0x0, wIndex = 0x0, wLength= 0x2

bRType = 0x81, bRequest = 0x0, wValue = 0x0, wIndex = 0x0, wLength= 0x2

bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x100, wLength= 0x0

StpCB:In SET_FTR 0::1

bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x0, wLength= 0x0

StpCB:In SET_FTR 0::1

bRType = 0xA1, bRequest = 0x87, wValue = 0x1400, wIndex = 0x100, wLength= 0xA

bRType = 0x81, bRequest = 0x0, wValue = 0x0, wIndex = 0x0, wLength= 0x2

bRType = 0x81, bRequest = 0x0, wValue = 0x0, wIndex = 0x0, wLength= 0x2

bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x100, wLength= 0x0

StpCB:In SET_FTR 0::1

bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x0, wLength= 0x0

StpCB:In SET_FTR 0::1

bRType = 0xA1, bRequest = 0x87, wValue = 0x1400, wIndex = 0x100, wLength= 0xA

bRType = 0xA1, bRequest = 0x81, wValue = 0x200, wIndex = 0x0, wLength= 0x1

bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x100, wLength= 0x0

StpCB:In SET_FTR 0::1

bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x0, wLength= 0x0

StpCB:In SET_FTR 0::1

bRType = 0xA1, bRequest = 0x87, wValue = 0x1400, wIndex = 0x100, wLength= 0xA

bRType = 0xA1, bRequest = 0x81, wValue = 0x200, wIndex = 0x0, wLength= 0x1

bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x100, wLength= 0x0

0 Likes

Hello,

Please let me know if you are facing any error when you use another host application like AMCap or MPC-HC?

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna
0 Likes

Hello Jayakrishna

after a weekend of hard work I succeeded to stream video to VLC: what blocked was an implementation issue in the Lattice FPGA.

Thanks much for your support: so far I am OK

0 Likes

Hello,

Thank you for the update. Good to hear that the problem is solved!

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna