Thank you for your reply.
I tried to change the stop order but I still get the issue, here I’ve attached 3 errors in 3 sessions on 3 different cameras. But, in some case it did help a lot (explain later).
SCF: Error InvalidState: Timeout!! Skipping requests on sensor GUID 2, capture sequence ID = 1 draining session frameEnd events 2
(in src/services/capture/FusaCaptureViCsiHw.cpp, function waitCsiFrameEnd(), line 646)
SCF: Error InvalidState: Sensor 2 already in same state
(in src/services/capture/CaptureServiceDeviceSensor.cpp, function setErrorState(), line 100)
SCF: Error InvalidState: Timeout!! Skipping requests on sensor GUID 2, capture sequence ID = 2 draining session frameEnd events 1
(in src/services/capture/FusaCaptureViCsiHw.cpp, function waitCsiFrameEnd(), line 646)
SCF: Error Timeout: Sending critical error event for Session 2
(in src/api/Session.cpp, function sendErrorEvent(), line 1039)
SCF: Error InvalidState: Sensor 2 already in same state
(in src/services/capture/CaptureServiceDeviceSensor.cpp, function setErrorState(), line 100)
SCF: Error InvalidState: Timeout!! Skipping requests on sensor GUID 2, capture sequence ID = 1 draining session frameStart events 2
(in src/services/capture/FusaCaptureViCsiHw.cpp, function waitCsiFrameStart(), line 529)
SCF: Error InvalidState: Sensor GUID 2 is in error state. Skipping requests, capture sequence ID = 2 continue draining session frameStart events 1
(in src/services/capture/FusaCaptureViCsiHw.cpp, function waitCsiFrameStart(), line 543)
SCF: Error BadParameter: CC has already been disposed (in src/components/CaptureContainerManager.cpp, function dispose(), line 161)
SCF: Error BadParameter: CC has already been disposed (in src/components/CaptureContainerManager.cpp, function dispose(), line 161)
SCF: Error InvalidState: Timeout!! Skipping requests on sensor GUID 1, capture sequence ID = 281466386776065 draining session frameStart events 281466386776066
(in src/services/capture/FusaCaptureViCsiHw.cpp, function waitCsiFrameStart(), line 529)
SCF: Error InvalidState: Sensor GUID 1 is in error state. Skipping requests, capture sequence ID = 281466386776066 continue draining session frameStart events 281466386776065
(in src/services/capture/FusaCaptureViCsiHw.cpp, function waitCsiFrameStart(), line 543)
SCF: Error InvalidState: Sensor 1 already in same state
(in src/services/capture/CaptureServiceDeviceSensor.cpp, function setErrorState(), line 100)
SCF: Error InvalidState: Timeout!! Skipping requests on sensor GUID 1, capture sequence ID = 1 draining session frameEnd events 2
(in src/services/capture/FusaCaptureViCsiHw.cpp, function waitCsiFrameEnd(), line 646)
SCF: Error InvalidState: Sensor GUID 1 is in error state. Skipping requests, capture sequence ID = 281466386776067 continue draining session frameStart events 281466386776064
(in src/services/capture/FusaCaptureViCsiHw.cpp, function waitCsiFrameStart(), line 543)
Segmentation fault (core dumped)
SCF: Error InvalidState: Timeout!! Skipping requests on sensor GUID 5, capture sequence ID = 1 draining session frameStart events 2
(in src/services/capture/FusaCaptureViCsiHw.cpp, function waitCsiFrameStart(), line 529)
SCF: Error InvalidState: Sensor GUID 5 is in error state. Skipping requests, capture sequence ID = 2 continue draining session frameStart events 1
(in src/services/capture/FusaCaptureViCsiHw.cpp, function waitCsiFrameStart(), line 543)
SCF: Error InvalidState: Sensor 5 already in same state
(in src/services/capture/CaptureServiceDeviceSensor.cpp, function setErrorState(), line 100)
SCF: Error InvalidState: Timeout!! Skipping requests on sensor GUID 5, capture sequence ID = 1 draining session frameEnd events 2
(in src/services/capture/FusaCaptureViCsiHw.cpp, function waitCsiFrameEnd(), line 646)
SCF: Error InvalidState: Sensor 5 already in same state
(in src/services/capture/CaptureServiceDeviceSensor.cpp, function setErrorState(), line 100)
SCF: Error InvalidState: Timeout!! Skipping requests on sensor GUID 5, capture sequence ID = 2 draining session frameEnd events 1
(in src/services/capture/FusaCaptureViCsiHw.cpp, function waitCsiFrameEnd(), line 646)
SCF: Error Timeout: Sending critical error event for Session 5
(in src/api/Session.cpp, function sendErrorEvent(), line 1039)
Also, if I load a driver that send out start/stop streaming I2C command to sensor with the same Argus code, it runs perfectly well, at least for the 40 restart cycle I did today with 6 cameras.
I made the following test with 6 cameras. I did have microcontroller on camera to initialize sensor so the MIPI stream can start automatically without Jetson intervention,
Streaming type |
crash test |
Linux driver send I2C start/stop streaming I2C signal |
no crash for at least 40 restarts |
Linux driver not send I2C start/stop streaming I2C signal, sensor keep streaming |
crash for around 3~6 restarts |
Linux driver not send I2C start/stop streaming I2C signal, having mosfet cut power after stop, and restore power 500ms after start |
crash for around 2~3 restarts |
Linux driver not send I2C start/stop streaming I2C signal, having mosfet cut power after stop, and restore power 1000ms after start |
crash for around 4~7 restarts |
Linux driver not send I2C start/stop streaming I2C signal, having mosfet cut power after stop, and restore power 1500ms after start |
no crash for at least 30 restarts |
Linux driver not send I2C start/stop streaming I2C signal, having mosfet cut power after stop, and restore power 1500ms after start, before changing the “cancelRequests” order |
crash for around 2~3 restarts |
In a summary, by changing the order of “cancelRequests”, and power on camera late enough, the argus can work. Although there is a lot of expected (NvCamV4l2) Error IoctlFailed: (in /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function setControlValMultiple(), line 793)
due to i2c communication failure, it can work.
Without checking the detail of Argus lib, I think I can make a assumption that when the argus is starting camera, we should make sure there is no video streaming. Is that true? Or there is a better way to evaluate it?
Also, in some of our previous test, when we try to start the camera, it seems Argus just queue our request and return immediately. Judging from the I2C signals, the real opening process can happen hundreds of milliseconds later. Is there a way to check if the Argus actually opens the camera, so we can power on the camera ASAP?