Other Parts Discussed in Thread: SYSCONFIG
Hi!
I have a cutom board running IPNC RDK 3.8.0.
The sensor we are using is AR0330.
When we are running camera + streaming everything ok. When adding linux program with lcd graphics soon we are getting resizer overflow.
I saw a lot of threads about overflow. This post is not about overflow removal(PBBPR=0xFFFF20 helps me to solve it).
There is camera restart try in the code. When overflow happens, ISS is disabled, reseted and should be started again.
But code is differs for sensors with parallel interface and CSI2 sensors.
Generally, the same code is used for regular startup and for startup after overflow.
- During regular startup sensor streaming is started (Iss_Ar0330EnableStreaming();) in a special place to complete csi2_wait_phy_reset() (just before it).
- When overflow happens ISS is reseted and this code is running again. Iss_Ar0330EnableStreaming() function enabling streaming but doesn't setup other registers. So at overflow moment sensor is still running and this function changes nothing.
- Sensor is running and no neccessary data/clock lane changes are happened and csi2_wait_phy_reset() just hangs.
- Moreover, during restart after overflow, function Iss_Ar0330EnableStreaming() is called form critical section (Task_disable() is called in Iss_captResetAndRestart()), and inside Iss_Ar0330EnableStreaming() we have Task_sleep(200), which can't be called from critical section.
It seems that this code was not tested with CSI2 sensor.
To avoid code hang and complete csi2_wait_phy_reset() during restart I'd added Iss_Ar0330StopStreaming function and removed Task_sleep() with long loop.
It allowed me to complete csi2_wait_phy_reset() but camera capture not resumed at this point, and I don't know what to do next..
Could IPNC team help me to get stable camera restart?
Thank You.