Hi,
We connected a analog camera to an external video-decoder (adv7180) which is connected to the viu using the 8bit itu656-interface (Vybrid VF512R3CMK4).
When we start the video-decoder it sends out the serial protocol, and we can see correctly the protocol (SAV/EAV starting with FF 00 00 XX, where XX has different state for field/vsync/hsync, ...)
The VIU detects field-irqs, but we don't get any vsync-irq.
Although we don't get any error-irqs, so it seams that the received protocol is correct (see ecc-errors in scr-register of viu), but the internal decoder from the viu-module doesn't generate a vsync-irq.
Has anybody use the viu using the 8bit itu656-mode ??
Here's the pining
PTC2 -> VIU_DATA2
PTC3 -> VIU_DATA3
PTC4 -> VIU_DATA4
PTC5 -> VIU_DATA5
PTC6 -> VIU_DATA6
PTC7 -> VIU_DATA7
PTC8 -> VIU_DATA8
PTC9 -> VIU_DATA9
PTB16 -> VIU_DATA10
PTA7 -> VIU_PIX_CLK
Another question is : How does the viu differ between 8bit and 10bit itu656-mode ?
Regards
Sebastian
Solved! Go to Solution.
Hi Sebastian,
we have checked all lines. If there are correctly connected to Vybrid: there is an issue on the board:
between External ADC and VIU data 2 is 10k resistor:
Measurement1:
Yellow is Analog
Red line is D2 (HR_VIU_DATA2) - before resitor
Green is clk
Light blue are D9 to D2
Red line is D2 (PTC2) - after resistor
So signal on D2 is not correctly connected.
Current state on terminal:
----------------------------------------------------------------------
Decoder Status (IN_LOCK): yes
Decoder Status (LOST_LOCK): no
Detected Video Standard: NTSC M/J
Correct line length detected: yes
Correct field length detected: yes
Interlaced video detected: yes
----------------------------------------------------------------------
Capture start !!!
VIU3 state is BUSY!
VIU3 state is BUSY!
VIU3 state is BUSY!
VIU3 state is BUSY!
VIU3 state is BUSY!
VIU3 state is BUSY!
VIU3 state is BUSY!
VIU3 state is BUSY!
VIU3 state is BUSY!
VIU3 state is BUSY!
Error stopping the VIU3 device, returned: 0xffffffff
VIU3 state is ERROR, error code is 47!
Device reset !!!
VIU3 state is READY!
Capture start !!!
VIU3 state is BUSY!
VIU3 state is BUSY!
...
...
We removed R604 and placed 0R - situation has changed significantly. signal on PTC2 is correct.
After resistor removal on terminal:
----------------------------------------------------------------------
Decoder Status (IN_LOCK): yes
Decoder Status (LOST_LOCK): no
Detected Video Standard: NTSC M/J
Correct line length detected: yes
Correct field length detected: yes
Interlaced video detected: yes
----------------------------------------------------------------------
Capture start !!!
VIU3 state is ERROR, error code is 7!
Device reset !!!
VIU3 state is READY!
Capture start !!!
VIU3 state is ERROR, error code is 5!
Device reset !!!
VIU3 state is READY!
Capture start !!!
VIU3 state is ERROR, error code is 5!
Device reset !!!
...
...
Error 7 is not enough lines
Error 5 is too many lines.
All interrupts are generated .
So now you have to change setting of the interface.
/Jiri
Hi Naoum,
See Re: Vf6xx - Contact image sensor - VideoADC
IMHO it is not possible to write a good driver for AFE and VDEC with that kind of documentation.
In your sample-code that you attached to the above discussion, you use registers that are even not in the memory map.
So we decided to use an external video decoder and only use the viu.
As explained above the external video decoder works fine but the viu-mdule .....
I hope there is a software-solution for that problem.
Regards Sebastian
Dear Sebastian,
Is my understanding correct that the major obstacle on the way to using the analog video inputs is lack of information about some registers? - It is a real pity that you have not stressed this point prior to redirecting your effort towards using an external video-decoder.
I agree with you that our documentation is not perfect, but the point here is that our software engineers somehow learned about these registers while developing Vybrid analog video-input drivers, and I can contact them to see if I can get this information.
This information might be "for factory use only", but most likely we can resolve these issues, e.g., by signing an NDA.
Your opinion, please?
Sincerely, Naoum Gitnik.
Dear Naoum,
It's not only the lack of information about these additional registers. There is not enough information about several registers and the internal function. To write a driver for the video subsystem is at the moment more like try-and-error than really developing it. It would be nice to get more information about it when available. But this is not that important.
At the moment it is much more important for us to fix the with viu problem when using ITU656.
Regards
Sebastian