2010-05-27 00:54:50 Still having problems with PPI clock
Peter Naulls (UNITED STATES)
Message: 89879
Tim Wilkerson suggested I post one more time to see if anyone had any good ideas. He reviewed in person what we've done, but didn't have any concrete ideas.
The current proplem is that the oscillator (either an external one, or generated from SPORT2) at ~24MHz passes through the camera and its default PLL setting of 4x. This results in a ~100Mhz pixel clock, which is well above its nominal peak of 75MHz. This could certainly explain the massive data loss (but occasional picture) seen at this rate.
I have tried many combinations of clock divider in the OV7725 we are using, and PLL settings or by passing it, etc, etc. But it seems that only the default 4x setting and a clock divider value of 0 (giving the 100MHz rate) results in anything that gives data picked up by the PPI.
Omnivision game me a bunch of settings to use with the camera for different frame rates, but again it's the same deal - only the 0 value works.
Trying to bring the pixel clock down using a slower crystal, I obtained a 12 and 16 MHz 5V oscillator and cobbled it together with a 3.3V regulator (our hardware guy is intermittently available and surely would have done a better job), but using those, nothing is obtained over, although I can see the pixel clock is now less than 75MHz. However, the oscillator output is not particularly square, so it looks like there's a bit of noise in the resulting derived clock (which presumably, the PPI is finicky about). We are trying to get some 3.3V oscillators, but I'm not that hopeful.
So, suggestions on either improving the signal from the oscillators I made, or something else I may have missed.
Thanks again.
QuoteReplyEditDelete
2010-05-27 06:55:38 Still having problems with PPI clock
Michael Hennerich (GERMANY)
Message: 89915 100MHz PPI_CLK is no go!
As far as I know the OV7725 is a VGA sensor.
- Assuming you run it at 30fps
(640 + blanking) * (480 + blanking) * 30fps * 2 (clocks_per_pixel) = approx. 18MHz
I would expect the PPI_CLK somewhere in this range.
Everything else doesn’t make sense.
QuoteReplyEditDelete
2010-05-27 11:47:13 Re: Still having problems with PPI clock
Peter Naulls (UNITED STATES)
Message: 89920
> 100MHz PPI_CLK is no go!
Indeed. But als, nothing else seems to work.
> Assuming you run it at 30fps
Probably 15 in practice, but that is a useful calculation, thanks.
> Everything else doesn’t make sense.
No? Perhaps my phrasing was unclear. I tried to be as detailed as possible. I guess a simple question is, what is the ideal clock shape for PPI_CLK input?
QuoteReplyEditDelete
2010-05-27 12:21:38 Re: Still having problems with PPI clock
tim wilkerson (UNITED STATES)
Message: 89921
Hey Peter,
Regarding ideal PPI clock shape, look at the datasheet. There should be sharp edges and little to no ground bounce and little overshoot, much shorter wires should help this a lot. The lower the better on the clock freq (due to non ideal layout), the 18Mhz sounds good.
Once you have a good clock, verify setup and hold times on the PPI data as coming from the sensor.
Were you able to optimize the oscillator connections as well as the power distribution on your external clock board? I thought we had concrete suggestions on making your oscillator board small, tight, decoupled, and directly on the 548 board header in order to get the best power distribution and signal integrity.
tim
QuoteReplyEditDelete
2010-05-27 13:33:47 Re: Still having problems with PPI clock
Peter Naulls (UNITED STATES)
Message: 89922
Yes, I shortened the clock connection as much as possible at your suggestion.
The problem I think is that even then, the signal is not that great from the 24MHz oscillator, and putting that through the clock divider (to get the output below 75MHz) appears to result in a messy signal to the PPI CLK. Similarly with different PLL settings. I will try again to see if there's some mechanical improvement that can be made.
QuoteReplyEditDelete
2010-05-27 19:54:29 Re: Still having problems with PPI clock
Peter Naulls (UNITED STATES)
Message: 89931
It's now working. One of the main final problems was that the sense of the vertical sync was backwards. It seems in practice that the PPI is quite tolerant of various clock rates I was generating (still with the max 75MHz in mind).
Thanks to everyone who helped. In due course I'll have an ov7725 driver for the blackfin_cam framework.