This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TVP5146 Black and White support

Other Parts Discussed in Thread: TVP5146

I have been working with the Davinci DM365 EVM board which has a TVP5146 part for composite video input.  The board works great using the standard TVP5146 driver with color cameras, however it fails to auto detect an input when I try to use a B/W camera.  These cameras are both NTSC.  I have verified with the scope that the timings on the black and white camera are exactly the same as the color, there just is no color burst or other chroma in the signal.  So at this point I am looking for a software reason why this isn't working, but wanted to verify that it should work from the hardware standpoint.  Also are there any differences in register setup that I should be aware of for this thing to correctly lock on a B/W only composite signal?  Thanks for any help you can provide. 

 

Kevin 

  • Kevin,

    Without the color burst, the TVP5146 should still be able to distinguish between a 525-line standard and a 625-line standard.

    What exactly do you mean by "fails to auto detect"?

    What standards are selected in the auto-switch mask?

    Regards,

    Jim

  •  

    This is most likely an auto-switch related issue, if the defualt setting (23h) is not being used in the Autoswitch Mask Registger (Subaddress 04h).  The TVP5146 auto-switch algorithm relies on the color burst to disinguish between 525 line video formats.  Please try setting REG04h=23h.

    Alternatively, you can force the TVP5146 to NTSC mode by setting the Video Standard Register (02h) = 01h.

    The crystal circutry can also lead to lock issues.  For most crystal types, we recommend using a 100k-ohm resistor in parallel with the crystal, in addition to the required crystal load capacitors.

    Larry

     

  • Larry,

     

    Thanks for the advice.  The combination of using the default autoswitch mask and hardcoding the video standard register seems to have solved the problem.  Thanks for the help. 

     

    As a side note, I do have a 100K resistor in parallel to the xtal in my design. 

    Kevin

  • Willl we be able to do the same for PAL as we have a B&W PAL camera?

    If so, what do we need to change because doing similar changes described for a NTSC above, we get "Lost Lock detect" in Status1 register.  On a first fly-by only the color subcarrier lock is indicated as lost lock (status1 = 0x66) and on the next it changes to 0x70 (or 0x71). 

    We are also using the EVMDM365 board with dvsdk_2_10_10_18 with LSP2.10.

    Thanks, Jinh T.

  • Jinh,

     

    One of the problems I was having was that the autodetect feature was selecting the wrong input so there were three things I did to get mine working, although now my design will only work with NTSC cameras on a single input which is ok for my application.

    1.  Hard code the tvp514x driver to NTSC (or PAL for your case).

    2.  Hard code the input channel to the correct channel.

    3.  Change the autodetect mask as stated above in this post.

    This wasn't an elegant solution, and if I get further funding I will probably go back and rework the hard codes, but for now it works great in the application I am looking at.

    Hope this helps,

     

    Kevin

  • Hi Kevin,

    being new to linux etc I am still in a bit of a corner hardcoding the driver.  I have changed the autoswitch mask but not the input channel as it seems to beOK with the one detected but am unsure about this and left the evm stuff as is so let me know if this is to be done please.  Hardcoding the driver is confusing me also - I have changed in tvp514x_i2c_init the input_info.std and def_std to V4L2_STD_PAL_I as well as in function tvp514x_setstd i make mode=TVP514X_MODE_PAL.  With these changes color detect still works but I still can't get it going in b&w.  Any chance you could give me more specific places of what I need to change to do the hardcoding thing please.

    Thanks, Jinh T.

  • Maybe just to give more detail on my current debug findings after Bernie on the DM3x forum said I should mention the TVP5146's behaviour here: these are done after changing autoswitch register to 23h and setting mode = PAL:

    On my debug output I see first round that TVP5146 indicates lost color subcarrier (register 3Ah = 0x66) but on second fly-by it looses the vertical and horizontal link and driver returns with lost detect and fails(reg_3Ah=0x70).  The input is from a Philips PM5514V video pattern generator where it works fine in color mode but when I set it to remove chroma I get these errors.  Any suggestions what to change in the driver or would it be OK to change the driver not to return the error but I would have assumed that it would only loose the color lock and not the others before I hack it not to return the Lost Lock detect in order to carry on.  What is also strange is that debug indicates "i2c_adapter i2c-0: tvp514x_setinput:lost lock]" at the point it returns the Status1 (3Ah) register with a value of 0x70. 

    Apparently there is nothing wrong with the I2C driver and it is the Lost Lock that should concern me.  Could it be that I have not set up the TVP5146 100% correctly that it somehow changes/loses mode again and lose my horizontal and vertical sync's?

    Thanks, Jinh T

  • I found setting to configure the board to pick up black and white video:

    Change lock_mask from 0x0E to 0x06 in dm365_tvp514x_evm_chan_config in file video_davinci_evm.c.

    There is not a need to change autoswitch mask or video standard register.

    Thanks to all for help, Jinh T.

  • Jinh,

    Do you know which TVP5146 registers are being affected by the lock_mask/chan_config change?

    Regards,

    LArry

     

  • Hi Larry,

    it's the Status1 register at 3Ah where it now ignores the ColorSubcarrierLockStatus bit.

    regards, Jinh T.