TI中文支持网
TI专业的中文技术问题搜集分享网站

I2C复用

我用的TMS320DM6467 HD 1080P EVM的使用手册中讲到I2C的地址0x5D被TVP5147和TVP7002复用。CPLD中嵌入的寄存器2地址为0x3B,其控制着上述两个芯片的复用选择。现在板子运行encode程序出错,怀疑I2C默认的是TVP5147,现在想使用TVP7002请问应该在哪里设置呢?是在应用层程序中么?

谢谢

Chris Meng:

你好,

需要通过I2C配置CPLD来修改。

对于encode demo,请参考encode help,应该可以选择输入是高清的。

addison zhang:

回复 Chris Meng:

你好Chris,encode.txt中确实有demo的使用帮助,但其中大部分是文件参数的设置,如下:

OPTIONS -v <video file>, –videofile <video file> Encodes video data to the given file. The file will be created if it doesn't exist, and overwritten if it does exist. The demo detects which type of video file is supplied using the file extension. Only H.264 BP (.264 extension) is supported.

-s <speech file>, –speechfile <speech file> Encodes speech data to the given file. The file will be created if it doesn't exist, and overwritten if it does exist. The demo detects which type of speech file is supplied using the file extension. The only supported speech algorithm is G.711 (.g711 extension).

-r <resolution>, –resolution <resolution> The resolution of video to encode in the format 'width'x'height'. Default is the resolution of the input video standard detected.

Note that the preview will still display the full frame even if this option is used.

-b <bit rate>, –videobitrate <bit rate> This option sets the bit rate with which the video will be encoded. Use a negative value for variable bit rate. Default is variable bit rate.

-p <bit rate>, –soundbitrate <bit rate> This option sets the bit rate with which the audio will be encoded. Default is 128000.

-u <sample rate>, –samplerate <sample rate> This option sets the sample rate with which the audio will be sampled and encoded (ignored for speech). Default is 44100 Hz.

-l, –linein This option makes the input device for sound recording be the 'line in' as opposed to the 'mic in' default.

-k, –keyboard Enables the keyboard input mode which lets the user input commands using the keyboard in addition to the IR remote control interface. At the prompt type 'help' for a list of available commands.

-t <seconds>, –time <seconds> The number of seconds to run the demo. Defaults to infinite time.

-o, –osd Enables the On Screen Display for data visualization. If this option is not passed, the data will be output to stdout instead.

If you don't pass a video file, the -o flag will be ignored.

-h, –help This will print the usage of the demo.

我使用的命令是:./encode -v test.264 -k。这其中也并没有讲输入模式的选择。程序编译时能通过,运行时报错:

Error: Failed to create capture device, 720P component input connected?

觉得是应用层调用open函数这一步没有运行,可是我的硬件和软件都是TI官方的运行起来应该没有问题啊?望给予指点,谢谢。

Chris Meng:

回复 addison zhang:

你好,

你报的错误是怀疑720p的分量输入没有接入,从这个可以判断是使用的TVP7002, TVP5146只能接标清(D1)的输入。

你确认分量输入有接入到EVM上么?

kooking:

I2C的设置,在arch/arm/mach-*6467*/board-*6467*.c相关的设备平台设置文件里,对于标清和高清,如果电路上有片选芯片,可能还有PINMUX需要设置

addison zhang:

回复 Chris Meng:

你好,我是接入了YPBPR信号可运行时依然报错。

addison zhang:

回复 kooking:

嗯,我同意你的看法,在输入端选择上PINMUX确实是默认为5147输入的,但TI官方好像并没有就这个软件说明硬件部分有要修改的内容。个人认为软件中应该包含修改完的部分,编译运行后应该没有错误的。。

arch/arm/mach-davinci/board-dm646x-evm.c中确实有关于输入选择的描述:

#define VPIF_INPUT_ONE_CHANNEL (BIT(5))#define VPIF_INPUT_TWO_CHANNEL (~BIT(5))

我想问下这种描述的意思是宏定义变量为CPLD寄存器的值么?这样也无法实现对CPLD寄存器值得控制啊,而且其中的通道选择函数如setup_vpif_input_channel_mode,在整个dvsdk文件夹下只能搜到这里的定义,无法找到它的引用。这样的话无法修改输入参数mux_mode。我在这个文件中人为的将mux_mode改为我需要的值,结果还是编译通过、运行时报错。

现在该怎样进行呢?求指点。

谢谢。

赞(0)
未经允许不得转载:TI中文支持网 » I2C复用
分享到: 更多 (0)