viewtopic.php?f=43&t=218576&p=1436391#p1436982
From other postings here it was clear that Raspberry v1 camera board (or China clones) do not expose ov5647 FREX and STROBE pins. After some searching I found that one of the many Arducam cameras is an ov5647 with FREX and STROBE exposed, and I ordered and received it.
Even the Arducam product description is a bit outdated (it mentions FREX, STROBE, GND and 3.3V pins only):
http://www.arducam.com/raspberry-pi-cam ... rformance/
Same for the product page where I bought my module (19$):
https://www.robotshop.com/en/arducam-ov ... ry-pi.html
Why outdated? The module I received has VSYNC exposed as well:

In the afternoon I did experiments again to "see something" on logic analyzer without success:
https://twitter.com/HermannSW/status/11 ... 7884691456
I do work as Compiler Level3 support for DataPower Gateways at my day job at IBM. We do have weekend coverage (I currently have), but customer issues need to be sev1 prod down to be handled on weekend and not on Monday.
I only mention this because short after the tweet I got Arducam support response on my request for infromation wrt FREX/STROBE and their camera module. I was really impressed, by the fact to get this on Sunday afternoon as well on the detailed technical information they provided.
My first successful logic analyzer capture of all three exposed ov5647 pins is from after a long walk with dog. Channel 0/1/2 were connected to FREX/STROBE/VSYNC:
https://twitter.com/HermannSW/status/11 ... 8853915649

This this the bash script I extended (based on i2cwrite36 tool from the other thread):
Code: Select all
$ cat frex_i2c
#!/bin/bash
./i2cwrite36 /dev/i2c-0 3002 ff
./i2cwrite36 /dev/i2c-0 3b01 00 08 00 04 00 14 1d
./i2cwrite36 /dev/i2c-0 3b08 01
sleep 0.1
./i2cwrite36 /dev/i2c-0 3b08 01
sleep 0.2
./i2cwrite36 /dev/i2c-0 3b08 01
./i2cwrite36 /dev/i2c-0 3b08 01
./i2cwrite36 /dev/i2c-0 3b08 01
./frex_i2c_trig
$
The initial two lines bring ov5647 into FREX mode, then FREX is triggered via frex_i2c mode by setting bit0 or 0x3b08 register. The last line generates 4 very short apart frex_i2c signals:
Code: Select all
$ cat frex_i2c_trig.c
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <unistd.h>
#define I2C_SLAVE_FORCE 0x0706
#define WRITE_I2C(fd, buf, len) (write(fd, buf, len) != len)
#define D 3000
int main(int argc, char *argv[])
{
int i2c_fd = 0;
char *i2c_device_name;
i2c_device_name = "/dev/i2c-0";
i2c_fd = open(i2c_device_name, O_RDWR);
assert(i2c_fd);
assert(ioctl(i2c_fd, I2C_SLAVE_FORCE, 0x36) >= 0);
char buf[3];
buf[0]=0x3b;
buf[1]=0x08;
buf[2]=0x01;
assert( WRITE_I2C(i2c_fd, buf, sizeof(buf))==0 );
buf[2]=0x00;
assert( WRITE_I2C(i2c_fd, buf, sizeof(buf))==0 );
usleep(D);
buf[2]=0x01;
assert( WRITE_I2C(i2c_fd, buf, sizeof(buf))==0 );
buf[2]=0x00;
assert( WRITE_I2C(i2c_fd, buf, sizeof(buf))==0 );
usleep(D);
buf[2]=0x01;
assert( WRITE_I2C(i2c_fd, buf, sizeof(buf))==0 );
buf[2]=0x00;
assert( WRITE_I2C(i2c_fd, buf, sizeof(buf))==0 );
usleep(D);
buf[2]=0x01;
assert( WRITE_I2C(i2c_fd, buf, sizeof(buf))==0 );
buf[2]=0x00;
assert( WRITE_I2C(i2c_fd, buf, sizeof(buf))==0 );
usleep(D);
if (i2c_fd)
close(i2c_fd);
return 0;
}
$
This is the complete logic analyzer picture (not sure about VSYNC in bottom channel 2).
First I started "raspivid -md 2 -fps 1 -pts tst.pts -t 8000 -o h.264 &" in background.
Then I started logic analyzer capture.
Then I executed "./frex_i2c".
After that completed I stopped I2C capture.

I really tried to minimize the time between consecutive frex_i2c triggers (the only possible on v1 camera), but 3ms usleep delay were needed to see the 4 strobe pulses (4.372ms apart ‒ that limits framerate to 228fps


I have to understand how the measured 10.37µs strobe pulse length corresponds to the register values written with i2cwrite36 command:

Summary sofar:
- above register settings allow to bring ov5647 into frex mode
- as shown frex_i2c works (allows v1 camera to do "global reset" captures)
- as described in other thread this means "global shutter" for exposure time of (line_time_ns =) 21.165µs!
(5000lm focussed light will produce well lighted frames) - The ov5647 Arducam exposed STROBE pin seems to be what people asked for long in "Hardware camera sync pulses" thread:
viewtopic.php?f=43&t=190314 - a lot more to investigate ...