Very low frame rates and syncpt timeouts

Hi,

I’m working on an application that can have very long shutter times.
The application works fine above 1 FPS.
However, when we need some longer shutter times, thus making our frame rate go below 1 FPS, we’ll receive a PXL_SOF timeout message and loose the frame (empty image returned).

After reading some threads on this forum, I modified the nvhost_syncpt_wait_timeout_ext function on vi4_fops.c file, which has a fixed timeout of 250 jiffies.
Doubling this timeout to 500 jiffies allowed us to work on 0.5 FPS with no issues.

I need to go beyond that, up to half an hour per frame if necessary. I put a very large value on the timeout and it did not work, the software was stuck after receiving the last image and I received multiple error messages.

How can I increase this timeout to allow me very low FPS?
Can this timeout be modified on the run?
Do I need to modify the ATOMP_FE timeout also?

Really appreciate the help,
Filipe.

You have to make sure that your intended camera driver works for higher exposure times. Most stock drivers are not supporting that. (DeviceTree parameters doesn’t necessarily mean that the driver supports it).

If you are using Argus camera API, you have to use sudo enableCamInfiniteTimeout=1 as launch parameter for the nvargus daemon:
sudo service nvargus-daemon stop
sudo enableCamInfiniteTimeout=1 nvargus-daemon

Hi @therealmatiss, thank your for your answer.

I’m not familiar with Argus camera API, we are using an FPGA based custom camera and Video4Linux.

Filipe

Sorry for the late response, have you managed to get issue resolved or still need the support? Thanks

Hi @kayccc
We could not get the timeout to work like we needed. It seems that modifiying nvhost_syncpt_wait_timeout_ext to a very large timeout (tried 5 s, 10 s, 300 s) can cause a lot of trouble, with the occasional complete freeze of our TX2. We ended up setting for a 4 s timeout to give us some time for other operations and using a different approach to get our long exposure images.

We still get some SYNCPT_TIMEOUT errors when stream off is called after all images are received.
Does stream off require a EOF to properly exit?

Thanks