- Published on
Developing OV5647 camera Linux device driver for Jetson Nano-It's alive! [Part 2]
- Authors
- Name
- Amarnath B R
- @digitallyamar
As I continued to work on writing OV5647 sensor driver for Linux on Nvidia Jetson Nano platform, I realized there are a lot more incomplete register desciptions in the OV5647 datasheet. So, I had to reverse engineer a lot more than I had estimated earlier to get the right initialization settings for the sensor module.
The first thing I wanted to do was to make sure that I am able to read and write to the sensor registers. I had read on the several forums that the Raspberry Pi v1 module is highly susceptible of getting damaged due to static charges. So me having only one Raspberry Pi v1 camera at my disposal, I had to be sure that the module is indeed still working while I play around with it. So being able to get some known values from the sensor's internal registers were a type of confirmation that the camera module is not yet dead!
Luckily, I found from the OV5647 sensor datasheet that there exists a couple of registers inside the sensor module that stored the Chip ID values of 0x56 and 0x47 respectively. With this knowledge, I went ahead and wrote code to issue I2C read commands to fetch the values of these registers.
There were a few hiccups in connecting the camera module using the MIPI CSI ribbon cable properly, but once that was fixed and proper power and clock signals were initialized, lo and behold - I was able to successfully read back 0x5647 values from the two Chip ID registers! Success at last!
Now that I knew my Raspberry Pi v1 camera was very much alive and kicking, it was about time I started integrating my OV5647 sensor driver with the Kernel's V4L2 stack and get it working. And this is precisely what I planned to do next!