How to Check If Camera Frames are Being Received on Jetson Xavier NX with Jetpack 5.1.3

Hello,

I am working with a Jetson Xavier NX and using Jetpack version 5.1.3. I am streaming camera data to the device and would like to verify whether frames are being received at the video nodes at the kernel level. Since the processor can support virtual channels, we want to know if one or both virtual channels are being received properly.

Could anyone provide guidance on how to check if the camera frames are being captured or processed correctly from the virtual channels? Any suggestions or tools I should use for this?

Thank you!

Hi,

For the camera basic functionality first needs to check the device and driver configuration.
You can reference to below program guide for the detailed information of device tree and driver implementation.
https://docs.nvidia.com/jetson/archives/r36.3/DeveloperGuide/SD/CameraDevelopment/SensorSoftwareDriverProgramming.html?highlight=programing#sensor-software-driver-programming

Please refer to Applications Using V4L2 IOCTL Directly by using V4L2 IOCTL to verify basic camera functionality.
https://docs.nvidia.com/jetson/archives/r36.3/DeveloperGuide/SD/CameraDevelopment/SensorSoftwareDriverProgramming.html?highlight=programing#to-run-a-v4l2-ctl-test

Once confirm the configure and still failed below link help to get log and some information and some tips for debug.
https://elinux.org/Jetson/l4t/Camera_BringUp#Steps_to_enable_more_debug_messages

Thanks!

Hi Carolyuu,

Thank you for the reply.

I would like to inform that I don’t have nay issues in bringing up the sensor, as of now I could able to stream without any issues.

As of now I’m looking for following issue:
In certain scenarios, the camera stops streaming. When this happens, reconfiguring the sensor allows me to resume the stream.

What I want to do now is to detect that frames are not coming within the kernel so that whenever frames don’t come, kernel has to send interrupt to my driver so that I can reconfigure.

we tried to debug files under Linux_for_Tegra/sources/kernel/nvidia/drivers/media/platform/tegra/camera/vi/ but we could not able identify.

Any suggestions on how to monitor this at the kernel level?

Thanks again!

While capture failed VI driver will run the tegra_channel_error_recover() function. You can start before this function call.

1 Like

Hi Shaneccc,

Thank you for your suggestion earlier. It was really helpful, and I was able to detect when frames are not being received by monitoring the **tegra_channel_error_recover**() function.

However, I have another question. I am currently working with two nodes, and I would like to know which specific node is not receiving frames. Could you suggest a way to identify the problematic node at the kernel level?

Thanks again for your support!

Suppose the “chan->virtual_channel” and vi_port should be able to know which device.

Thanks

1 Like

Thank you :)

Hi ShaneCCC,

Thank you for your help! It worked perfectly. Now, I was wondering if you could kindly assist me with sending an interrupt from tegra_channel_error_recover to Linux_for_Tegra/sources/kernel/nvidia/drivers/media/i2c/ driver . I would greatly appreciate your guidance on how to achieve this.

Hi ShaneCCC,

The tegra_channel_error_recover function is being triggered whenever streaming is halted. However, this function keeps getting called repeatedly, which leads to the sensor being reconfigured multiple times.

Could you help me resolve this issue?

Thank you

It will retry after 2500 ms.
Check the vi5_fops.c for the detail.

#define CAPTURE_TIMEOUT_MS	2500
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.