Hi!
I'm trying to use an
OV5642 camera module with a PYNQ-Z2 FPGA board. I made a little test project which uses DMA to write frames to the CPU's memory, and the CPU sends it to the PC via ethernet.
All of this works fine, but I just can't figure out how to configure the camera properly.
My goal is to use it with RAW Bayer output at 640x480 resolution for now. (On this board I can't really connect a high-frequency parallel bus, and FPS is more important than resolution)
The scaling function doesn't seem to work. I always get a 640x480 pixel cropped part of the sensor array, which makes the FOV very narrow.
I started by copying the configs from
ArduCAM's repo. The driver itself performs a soft reset, then applies the
OV5642_1280x960_RAW and
OV5642_640x480_RAW configs. (I have attached it to this post.)
This produces the cropped image. Then I started to experiment with the settings.
- The scaling (0x5001[5:4]) wasn't enabled, but enabling it doesn't make a difference.
- Subsampling would also be fine for me. The vertical subsampling (0x3818[1:0]) works fine. Horizontal subsampling (0x5002[2]) produces a white image, both in averaging and skip mode (0x501C)
- I also thought that maybe the scaler can only do integer ratios, so I have set the crop window size (0x3804-0x3807) to 1280x960. That didn't help either.
- The OV5640 looks kind of similar, so I have checked out some configs for that, and tried to find the matching registers in the OV5642, but couldn't find any clues
Does anyone have experience with this module? At this point, I'm thinking that maybe my camera is faulty. Can you recommend a similar module (even a lower resolution one)?