Occasionly lost camera frame without any log or error( inconsistency between CHANSEL_LOAD_FRAMED and CHANSEL_PXL_SOF)

dear,I have a problem about the frame lost when I using TX2NX CSI interface to acquire frame in externel trigger mode.

Very occasionally, we encounter a frame lost every 10K or even more without any error.
I can find the abnorm from the timestamp。

what is your suggestion about the inconsistency between CHANSEL_LOAD_FRAMED and CHANSEL_PXL_SOF?
I have tried to maxim the CPU frequency or lower the fps,all of this doesn‘t work.

7a7ec71aaec0dee303c53434cea2e5d2

按<q>,再按<enter>退出,按其他键继续
2023-09-27 09:14:49.595600 开始一个循环
2023-09-27 09:14:49.795720 , before trigger
2023-09-27 09:14:49.800605 , after trigger
2023-09-27 09:14:49.816558 /dev/video0 read frame 1
2023-09-27 09:14:49.817736 /dev/video1 read frame 1
2023-09-27 09:14:49.825028 /dev/video0 read frame 2
2023-09-27 09:14:49.825624 /dev/video1 read frame 2
2023-09-27 09:14:49.833406 /dev/video0 read frame 3
2023-09-27 09:14:49.833980 /dev/video1 read frame 3
2023-09-27 09:14:49.841671 /dev/video0 read frame 4
2023-09-27 09:14:49.842277 /dev/video1 read frame 4
2023-09-27 09:14:49.850070 /dev/video0 read frame 5
2023-09-27 09:14:49.850651 /dev/video1 read frame 5
2023-09-27 09:14:49.858444 /dev/video0 read frame 6
2023-09-27 09:14:49.858786 /dev/video1 read frame 6
2023-09-27 09:14:49.866759 /dev/video0 read frame 7
2023-09-27 09:14:49.867361 /dev/video1 read frame 7
2023-09-27 09:14:49.875045 /dev/video0 read frame 8
2023-09-27 09:14:49.875662 /dev/video1 read frame 8
2023-09-27 09:14:49.883431 /dev/video0 read frame 9
2023-09-27 09:14:49.884026 /dev/video1 read frame 9
2023-09-27 09:14:49.891904 /dev/video0 read frame 10
2023-09-27 09:14:49.891955 /dev/video1 read frame 10
2023-09-27 09:14:49.900265 /dev/video0 read frame 11
2023-09-27 09:14:49.900425 /dev/video1 read frame 11
2023-09-27 09:14:49.908522 /dev/video0 read frame 12
2023-09-27 09:14:49.908561 /dev/video1 read frame 12
2023-09-27 09:14:49.916880 /dev/video1 read frame 13
2023-09-27 09:14:49.916926 /dev/video0 read frame 13
2023-09-27 09:14:49.925183 /dev/video0 read frame 14
2023-09-27 09:14:49.925213 /dev/video1 read frame 14
2023-09-27 09:14:49.933396 /dev/video0 read frame 15
2023-09-27 09:14:49.933977 /dev/video1 read frame 15
2023-09-27 09:14:49.941665 /dev/video0 read frame 16
2023-09-27 09:14:49.942270 /dev/video1 read frame 16
2023-09-27 09:14:49.958245 /dev/video1 read frame 17
2023-09-27 09:14:49.958349 /dev/video0 read frame 17
2023-09-27 09:14:49.966917 /dev/video0 read frame 18
2023-09-27 09:14:49.966972 /dev/video1 read frame 18
2023-09-27 09:14:49.975244 /dev/video1 read frame 19
2023-09-27 09:14:49.975283 /dev/video0 read frame 19
2023-09-27 09:14:59.982883 /dev/video0 select timeout
2023-09-27 09:14:59.985358 /dev/video1 select timeout
2023-09-27 09:15:39.808101 Timeout reached!
2023-09-27 09:15:39.808173 不满足条件,return 19, 19
terminate called without an active exception
Aborted (core dumped)
ubuntu@localhost:~/camera_nvidia_v5_platform/projector/build/samples$


94000.txt (10.8 MB)
2.log (2.4 MB)

hello 896119453,

how you sending external trigger to sensor side, can you confirm it’s actually sending frames to CSI channel?

also, may I know what’s select timeout it really means?

hi, Chang,

external trigger is generated from a signal generator.
【select timeout】means application timeout. the application will terminate itself when it acquire image timeout.

Is there any other reason that could lost the CHANSEL_PXL_SOF besides trigger lost?

Alan

hi, Chang,

Could I get error log(frame missing,frame incomplete,frame SOF missing,fame EOF missing) from rtcpu_vinotify?

Or the rtcpu will drop all incorrect data(frame incomplete,frame SOF missing,fame EOF missing) without any log or other information.
I am confused about the errorlog of the rtcpu_vinotify_event.

The following is the correct log, when frame lost occurs, all the SOF, event, EOF log is missing.
I want to figure out what has happened. either the SOF missing or the data error or EOF lost. but there is no hints.

     kworker/3:1-8392  [003] ....  2934.820221: rtcpu_vinotify_event: tstamp:91947427906 tag:ATOMP_FS channel:0x00 frame:0 vi_tstamp:91947426821 data:0x00000000
     kworker/3:1-8392  [003] ....  2934.820223: rtcpu_vinotify_event: tstamp:91947428019 tag:ATOMP_FS channel:0x01 frame:0 vi_tstamp:91947426822 data:0x00000000
     kworker/3:1-8392  [003] ....  2934.820225: rtcpu_vinotify_event: tstamp:91947433675 tag:CHANSEL_LOAD_FRAMED channel:0x01 frame:0 vi_tstamp:91947433307 data:0x08000000
     kworker/3:1-8392  [003] ....  2934.820227: rtcpu_vinotify_event: tstamp:91947434210 tag:CHANSEL_LOAD_FRAMED channel:0x04 frame:0 vi_tstamp:91947433844 data:0x18000000
     kworker/3:1-8392  [003] ....  2934.820229: rtcpu_vinotify_event: tstamp:91947612489 tag:CHANSEL_PXL_EOF channel:0x00 frame:0 vi_tstamp:91947611375 data:0x04c10002
     kworker/3:1-8392  [003] ....  2934.820231: rtcpu_vinotify_event: tstamp:91947612614 tag:CHANSEL_PXL_EOF channel:0x01 frame:0 vi_tstamp:91947611376 data:0x04c10002

It looks like that some trigger is missing, but the trigger signal has been obersvered and counted by a oscilloscope, and the number and waveform is correct.

hello Alanwong,

may I double confirm the platform you’re working with?
TX2 uses CPE (Camera Processing Engine) instead of RTCPU.

I don’t know how to replace the RTCPU, and what is CPE? Is there documentation related to it?