My custom board has ADV7182 to get images from two cameras and decode to my microcontroller. I've configured by I2C the init in "Free Run Mode" and in "Colors Bar Mode". In free run mode I could see that the images showed in LCD has relation to camera movements, but fully abstract. In colors bar mode I could see some pixels coloured, but without synchronization.
This I could get.
I followed the instructions from "5340.ADV7182RSD_revC" and "ADV7182CUST-VER.5.0.txt".
Please make sure this from your side - ADV7182 requires a 28.63636 MHz clock input in order to operate correctly. This clock input can be supplied from either an external crystal or an external oscillator device.
Could you please share your register dump?
Note: When the DEF_VAL_ AUTO_EN bit is 0, the ADV7182 outputs noise if it cannot decode the input video. It is recommended that the user keep DEF_VAL_AUTO_EN set to 1. And also crosscheck with below things,
Thanks for reply. The external crystal is ok, when I send (0x13,0x00) to enable external 28.63636MHz I checked with osciloscope and is oscillating.
My registers init you can find below:
ADV7182_Write(0x0F, 0x80); /* Resets device */
ADV7182_Write(0x0F, 0x00); /* Exit Power Down Mode */
ADV7182_Write(0x13, 0x00); /* Select 28.63636 MHz Clock Input */
ADV7182_Write(0x52, 0xCD); /* Set optimized IBIAS for AFE in Single Ended CVBS Format */
/* Set for Free Run mode */
ADV7182_Write(0x00, 0x05); /* Select AIN1 as INPUT */
/* ADI Steps */
ADV7182_Write(0x0E, 0x80); /* ADI Required Write; Reset Current Clamp Circuitry (step 1) */
ADV7182_Write(0x9C, 0x00); /* ADI Required Write; Reset Current Clamp Circuitry (step 2) */
ADV7182_Write(0x9C, 0xFF); /* ADI Required Write; Reset Current Clamp Circuitry (step 3) */
ADV7182_Write(0x0E, 0x00); /* ADI Required Write; Reset Current Clamp Circuitry (step 4) */
/* Fast Switch Mode was skipped */
ADV7182_Write(0x17, 0x41 ); /* Select SH1 Chroma Shaping Filter */
ADV7182_Write(0x03, 0x0C); /* Enable Pixel & Sync output drivers */
ADV7182_Write(0x04, 0x07); /* Power-up INTRQ, HS and VS/FIELD/SFL pad */
ADV7182_Write(0x1D, 0x40); /* Enable LLC Output Driver */
This configuration is to show a Blue screen to eliminate camera variable, so testing ADV7182 -> microcontroller -> TFT.
About DEF_VAL_ AUTO_EN I kept the value set.
You can able to see any signals on Hs/Vs/Field Pins of ADV7182A?
Yes, in VS pin I have a square wave with 40ms of period.
In HS pin I have pulses each 64us.
Is it ok?
As per CEA-861 spec, Please make sure whether you can able to read the proper timing parameter(HFreq,VFreq) w.r.t your input format.
Thanks for reply.
In free run mode, for example when I want to show a Blue screen t or colors bars, what is the resolution of this image that ADV7182 send?
I found the problem, it is my conversion from YCbCr to RGB888 format.
You can show either in blue screen or color bar depends on your requirement.But by default Cr/Cb gives blue screen output in freerun mode. Default resolution - 480p.
And also using VID_SEL[3:0] bits can be used to force the video standard output in free-run mode - See the Video Standard Selection section.
Please let me know, why this conversation in freerun "I found the problem, it is my conversion from YCbCr to RGB888 format." ?
About the conversion from YCbCr to RGB888 I had a problem in my algorithm, so I could fix it. My microcontroller reads the video decoder in YCbCr format and my display is in RGB888, so a mannualy conversion is necessary.
Well I have a region of the memory were I write all receive data from ADV7182A, after I convert this data to RGB888 and copy to my framebuffer. If I write the region of memory in YCbCr format for example to have line bars colors, after it works, so my conversion is ok.
But when I read from ADV7182 in the feature "Colors Bars Mode" I have the below screen. It seems like I have a bad synchronization in horizontal pixels.
How many pixels does ADV7182 send in a line? I couldn't find it in datasheet and this basic working I don't have very clear.