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.
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?
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.
Ok thank you, I will do that.