30fps camera only provides 15fps

I’m on Jetpack 4.2. I have a custom camera (FPGA based) that i’m interfacing to a TX2.

I’m outputting 30fps via CSI but I only see 15fps. I’ve looked at other threads on this but they don’t seem to apply to my case, e.g., increasing clock speed or reducing exposure on the camera. Is there anything else that I can try?

root@jetson-tx2:~# v4l2-ctl --list-formats-ext
        Type: Video Capture

        [0]: 'UYVY' (UYVY 4:2:2)
                Size: Discrete 640x480
                        Interval: Discrete 0.033s (30.000 fps)
                Size: Discrete 1280x720
                        Interval: Discrete 0.033s (30.000 fps)
        [1]: 'NV16' (Y/CbCr 4:2:2)
                Size: Discrete 640x480
                        Interval: Discrete 0.033s (30.000 fps)
                Size: Discrete 1280x720
                        Interval: Discrete 0.033s (30.000 fps)
v4l2-ctl --set-fmt-video=width=640,height=480,pixelformat="UYVY" --device=/dev/video0  --stream-count=300 --stream-mmap

<<<<<<<<<<<<<<<<< 15.03 fps
<<<<<<<<<<<<<<< 15.03 fps
<<<<<<<<<<<<<<< 15.03 fps

Did you verify increasing the pix_clk_hz in the device tree?
If both of them are not help, I doubt the output is not 30fps. Could you check the interval of each SOF in the trace log.

I know my pix_clk_hz is 100 MHz, but I just tried to change it to 200 MHz and no difference. I’m controlling the timing on the FPGA side so I’m certain I’m outputting 30 Hz. But I could definitely be doing something else wrong.

I enabled the trace log and I see ~60 ms between SOF indicating 15 Hz. But, it’s weird how the frame index increments by 2 yeah?

vi-output, driver -2593  [003] ....  2220.911157: tegra_channel_capture_frame: sof:2220.791361440
     kworker/0:0-4     [000] ....  2220.915742: rtcpu_vinotify_event: tstamp:69680658270 tag:ATOMP_FE channel:0x00 frame:16028 vi_tstamp:69680657820 data:0x00000000
     kworker/0:0-4     [000] ....  2220.915744: rtcpu_vinotify_event: tstamp:69681698908 tag:CHANSEL_PXL_SOF channel:0x00 frame:16030 vi_tstamp:69681698401 data:0x00000001
     kworker/0:0-4     [000] ....  2220.915745: rtcpu_vinotify_event: tstamp:69681699070 tag:ATOMP_FS channel:0x00 frame:16030 vi_tstamp:69681698409 data:0x00000000
     kworker/0:0-4     [000] ....  2220.915746: rtcpu_vinotify_event: tstamp:69681702038 tag:CHANSEL_LOAD_FRAMED channel:0x01 frame:16030 vi_tstamp:69681701683 data:0x08000000
     kworker/0:0-4     [000] ....  2220.971733: rtcpu_vinotify_event: tstamp:69681871895 tag:CHANSEL_PXL_EOF channel:0x00 frame:16030 vi_tstamp:69681871487 data:0x01df0002
     kworker/0:0-4     [000] ....  2220.971735: rtcpu_vinotify_event: tstamp:69682737260 tag:ATOMP_FE channel:0x00 frame:16030 vi_tstamp:69682736811 data:0x00000000
     kworker/0:0-4     [000] ....  2220.971737: rtos_queue_peek_from_isr_failed: tstamp:69682744057 queue:0x0b4b4500
 vi-output, driver -2593  [003] ....  2220.977672: tegra_channel_capture_frame: sof:2220.857889184
     kworker/0:0-4     [000] ....  2221.027737: rtcpu_vinotify_event: tstamp:69683777892 tag:CHANSEL_PXL_SOF channel:0x00 frame:16032 vi_tstamp:69683777393 data:0x00000001
     kworker/0:0-4     [000] ....  2221.027740: rtcpu_vinotify_event: tstamp:69683778054 tag:ATOMP_FS channel:0x00 frame:16032 vi_tstamp:69683777400 data:0x00000000
     kworker/0:0-4     [000] ....  2221.027741: rtcpu_vinotify_event: tstamp:69683780620 tag:CHANSEL_LOAD_FRAMED channel:0x01 frame:16032 vi_tstamp:69683780264 data:0x08000000
     kworker/0:0-4     [000] ....  2221.027741: rtcpu_vinotify_event: tstamp:69683950888 tag:CHANSEL_PXL_EOF channel:0x00 frame:16032 vi_tstamp:69683950478 data:0x01df0002
     kworker/0:0-4     [000] ....  2221.027742: rtcpu_vinotify_event: tstamp:69684816248 tag:ATOMP_FE channel:0x00 frame:16032 vi_tstamp:69684815802 data:0x00000000
 vi-output, driver -2593  [003] ....  2221.044199: tegra_channel_capture_frame: sof:2220.924416896
     kworker/0:0-4     [000] ....  2221.083724: rtcpu_vinotify_event: tstamp:69685856881 tag:CHANSEL_PXL_SOF channel:0x00 frame:16034 vi_tstamp:69685856384 data:0x00000001
     kworker/0:0-4     [000] ....  2221.083725: rtcpu_vinotify_event: tstamp:69685857043 tag:ATOMP_FS channel:0x00 frame:16034 vi_tstamp:69685856391 data:0x00000000
     kworker/0:0-4     [000] ....  2221.083726: rtcpu_vinotify_event: tstamp:69685859604 tag:CHANSEL_LOAD_FRAMED channel:0x01 frame:16034 vi_tstamp:69685859250 data:0x08000000
     kworker/0:0-4     [000] ....  2221.083726: rtcpu_vinotify_event: tstamp:69686029879 tag:CHANSEL_PXL_EOF channel:0x00 frame:16034 vi_tstamp:69686029469 data:0x01df0002
     kworker/0:0-4     [000] ....  2221.083727: rtcpu_vinotify_event: tstamp:69686895240 tag:ATOMP_FE channel:0x00 frame:16034 vi_tstamp:69686894794 data:0x00000000
 vi-output, driver -2593  [003] ....  2221.110724: tegra_channel_capture_frame: sof:2220.990944608

this is probably a problem?


@ShaneCCC do you have any insight into how to debug that isr failed?

It seems that either I’m not sending out a SOF for half the frame or the TX2 is not getting the SOF. That’s my interpretation for the frame index moving in increments of 2. Do you agree with that?

@ShaneCCC this was a problem on the FPGA side.

So the problem solved?

@ShaneCCC yes, thank you.

Hi @clutch12
I’m having a similar problem. May I know which was your problem on the FPGA side? Thanks in advance!

hope this helps. I worked it on the Xilinx side