STM32N6ISP: Need help with Eliminating Auto Exposure convergence delay using external OPT3001 (Feed-forward LUT)
Hello everyone,
I am currently developing with the STM32N6570-DK and utilizing the hardware ISP. I am facing an issue with the embedded Auto Exposure (AE) algorithm's convergence time. It currently takes about 20-30 frames (~1 second) for the AE to settle on the correct exposure and gain. For my application, it is critical that the very first frame upon wake-up is perfectly exposed, meaning a 1-second delay is not acceptable.
To bypass this feedback loop, I have integrated a Texas Instruments OPT3001 Ambient Light Sensor (I2C) to implement a feed-forward solution. My intended sequence is:
-
Read the absolute ambient lux from the OPT3001 on boot.
-
Map this lux value to a pre-calibrated Lookup Table (LUT) to determine the ideal
Exposure TimeandSensor Gain. -
Force the STM32 ISP into manual exposure mode and inject these values directly.
-
Start the camera stream to achieve a zero-delay, perfectly exposed first frame.
I have a few questions regarding the best way to implement this within the ST ecosystem:
-
Calibration via IQTune: I am currently using the STM32 ISP IQTune tool to manually find the ideal exposure/gain at various lux levels (by turning the AE Algorithm OFF). Is this manual sweep the recommended way to build this LUT, or does ST provide a more automated procedure/tool for mapping external lux to sensor parameters?
-
API Injection Sequence: What is the recommended API sequence (via the STM32 BSP or V4L2 framework) to inject manual Exposure Time and Gain before the image stream starts? I want to ensure the AE algorithm doesn't override these values on the first frame.
-
Seeding the AE: Once I inject the manual values for the first frame, is there a seamless way to hand control back over to the closed-loop AE algorithm (using my injected values as the new starting seed), or is it safer to leave the ISP in manual mode and continually update it via the OPT3001?
