CX3 streaming not restarting after CX3_DMA_RESET_EVENT

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

cross mob
RiBi_4316346
Level 1
Level 1

Hello,

I am streaming video from CMOS sensor to Windows 10 PC using CX3.

The firmware was obtained using the standard configuration tool, and I am able to stream correctly to standard host application (AMCap).

I want to be able to stop and restart the streaming from the host PC, so I use UVC extension unit to set a CX3_DMA_RESET_EVENT.

The event is set correctly and the streaming stops, but it does not restart.

To make it restart I have to put the sensor to sleep (so there is no MIPI data arriving to CX3): when I reactivate the sensor the UVC streaming resumes.

What can be the issue?

Thank you,

Riccardo

0 Likes
1 Solution

Hello Riccardo,

It is not possible to restart UVC transmission with the image sensor always streaming.


In CyCx3UvcAppStop(), we call the CyU3PMipicsiSleep() which makes the CX3's MIPI RX to go to sleep before keeping the image sensor to sleep and in CyCx3UvcAppStart(), we call the CyU3PMipicsiWakeup() API which wakes up the CX3's MIPI RX before waking up the image sensor.

It is recommended to follow this to make sure the MIPI RX in CX3 and MIPI TX of image sensor are synchronized properly even during start/ stop (restart) of the streaming.

Please uncomment the CyCx3_ImageSensor_Wakeup() and CyCx3_ImageSensor_Sleep() functions since it is recommended to use these.


Regards,

Yashwant

View solution in original post

0 Likes
4 Replies
YashwantK_46
Moderator
Moderator
Moderator
100 solutions authored 50 solutions authored 50 likes received

Hello Riccardo,


Since the firmware is generated by the CX3 Configuration Utility, the functions CyCx3_ImageSensor_Sleep() and CyCx3_ImageSensor_Wakeup() are generated in the uvc.c file.

The two functions need to access the image using i2c and write to a sensor, the appropriate values for either putting the sensor to sleep or waking up the sensor from sleep need to added to the firmware manually.

Generally, in the CX3 firmware when the CX3_DMA_RESET_EVENT is set, the firmware calls CyCx3UvcAppStop() in which CyCx3_ImageSensor_Sleep() is called and then calling CyCx3UvcAppStart() in which the CyCx3_ImageSensor_Wakeup() is called handle the stream stop and start function from the image sensor to keep the stream in sync.

So, it is necessary to put the sensor to sleep if you are stopping the stream and waking it up when restarting the stream again.

Regards,
Yashwant

0 Likes

Hello Yashwant,

thank you for the answer.

In fact in my firmware I commented out the calls to CyCx3_ImageSensor_Wakeup() and CyCx3_ImageSensor_Sleep() inside the functions CyCx3UvcAppStart() and CyCx3UvcAppStop() because I want the sensor to be always streaming, also during the resetting of MIPI interface.

Is it possible to stop/restart the UVC transmission even keeping the sensor always streaming?

Regards,

Riccardo

0 Likes

Hello Riccardo,

It is not possible to restart UVC transmission with the image sensor always streaming.


In CyCx3UvcAppStop(), we call the CyU3PMipicsiSleep() which makes the CX3's MIPI RX to go to sleep before keeping the image sensor to sleep and in CyCx3UvcAppStart(), we call the CyU3PMipicsiWakeup() API which wakes up the CX3's MIPI RX before waking up the image sensor.

It is recommended to follow this to make sure the MIPI RX in CX3 and MIPI TX of image sensor are synchronized properly even during start/ stop (restart) of the streaming.

Please uncomment the CyCx3_ImageSensor_Wakeup() and CyCx3_ImageSensor_Sleep() functions since it is recommended to use these.


Regards,

Yashwant

0 Likes

Ok thank you, I will do that.

Best regards,

Riccardp

0 Likes