Part Number:DS90UB960-Q1
您好!
我在使用 DS90UB960 搭配 DS90UB935,接收4路 DS90UB935输入,将四路图像输出到ECU,发现4路图像是混在一起的,ECU无法将其拆分开。我想确认一下, DS90UB960 这边的设置是否正确,谢谢。
现象图片:
相关寄存器设置:
//RX0
{UB960,0x4c,0x01}, //PORT0
{UB960,0x58,0x58},
{UB960,0x5c,0x18},
{UB960,0x5d,0x48},
{UB960,0x65,0x48},
{UB960,0x6d,0x7c},
{UB960,0x72,0x00}, //VC0
{UB960,0x7c,0x01},
//RX1
{UB960,0x4c,0x12}, //PORT1
{UB960,0x58,0x58},
{UB960,0x5c,0x1a},
{UB960,0x5d,0x48},
{UB960,0x65,0x4a},
{UB960,0x6d,0x7c},
{UB960,0x72,0x04}, //VC1
{UB960,0x7c,0x01},
//RX2
{UB960,0x4c,0x24}, //PORT2 {UB960,0x58,0x58},
{UB960,0x5c,0x1c},
{UB960,0x5d,0x48},
{UB960,0x65,0x4c}, {UB960,0x6d,0x7c},
{UB960,0x72,0x20}, //VC2
{UB960,0x7c,0x01},
//RX3
{UB960,0x4c,0x38}, //PORT3 {UB960,0x58,0x58},
{UB960,0x5c,0x1e},
{UB960,0x5d,0x48},
{UB960,0x65,0x4e}, {UB960,0x6d,0x7c},
{UB960,0x72,0xc0}, //VC3
{UB960,0x7c,0x01}, {UB960,0x32,0x01}, //# CSI0 select
{UB960,0x1f,0x02}, //# CSI0 800mbps
{UB960,0x33,0x01}, //# CSI_EN & CSI0 4L & CSI_CONTS_CLOCK
{UB960,0x21,0x01}, // Round robin forwarding
{UB960,0x20,0x00},
Kailyn Chen:
您好, 我看了下寄存器的配置,包括虚拟通道的配置,好像没什么问题.
另外,UB960本身也是将来自多个sensor的数据流组合成一个或两个CSI -2 端口上,每个端口又包含4个数据通道.
The device combines data streams from multiple sensor sources onto one or two MIPI CSI-2 port(s) with up to four data lanes on each port.
所以您这里提到ECU无法将其分开,您需要得到两个MIPI CSI-2输出是吗?我看您这边寄存器0x21 已经enable replicated 输出了.
不知是不是误解了您的意思,或者您参考下7.4.18 CSI-2 Mode Virtual Channel Mapping关于虚拟通道映射的几个例子, 您的应用符合其中哪个例子.
,
user6481281:
Hi Kailyn,
感谢回复! 我的意思是,960通过CSI-2 PORT0输出的图像数据到我的后端ECU上,4路的图像画面是混合在一起的,都在通道0里面,ECU没办法将其拆分开了放进4路进行画面显示。
我这边已经在好到原因了,是Virtual Channel Mapping的问题,960规格书中关于寄存器0x72的描述与实际使用是不一致的。也就是我上面关于寄存器0x72的设置时错误的。
按照960规格书的描述:
我应该设置成如下参数,但实际上这样设置进去,4个channel的VC-ID都设置成0了,实际只用到一个VC-ID,所以4路画面会混在一起。:
{UB960,0x4c,0x01}, //PORT0{UB960,0x72,0x00}, //VC0
{UB960,0x4c,0x12}, //PORT1{UB960,0x72,0x04}, //VC1
{UB960,0x4c,0x24}, //PORT2{UB960,0x72,0x20}, //VC2
{UB960,0x4c,0x38}, //PORT3{UB960,0x72,0xC0}, //VC3
我将其改成如下设置,就正常了,这样VC0~VC3就分别对应VC-ID 0~3.
{UB960,0x4c,0x01}, //PORT0{UB960,0x72,0x00}, //VC0
{UB960,0x4c,0x12}, //PORT1{UB960,0x72,0x01}, //VC1
{UB960,0x4c,0x24}, //PORT2{UB960,0x72,0x02}, //VC2
{UB960,0x4c,0x38}, //PORT3{UB960,0x72,0x03}, //VC3
所以,规格书上的描述是有问题的,你看看是不是这样呢?
感谢!!!
,
Kailyn Chen:
您好,我的理解不是这样的,如果是这样的话, 那改变的就只有bit[1:0]. 应该是这个意思,举个例子:
比如输入image 是VC-ID1, 那我们需要重新映射到VC-ID3, 那就需要将寄存器bit[3:2]配置为b'11.
同样,如果image 是VC-ID0, 重新映射到VC-ID2, 那需要配置[1:0]为b'10.
[7:6] : Map value for VC-ID of 3
[5:4] : Map value for VC-ID of 2
[3:2] : Map value for VC-ID of 1
[1:0] : Map value for VC-ID of 0
,
Kailyn Chen:
另外,我看您截取的0x72的寄存器图,您参考的应该不是最新版的datasheet, 最新版的为Table 7-131. CSI_VC_MAP Register (Address 0x72).参考最新数据手册Page115:
www.ti.com.cn/…/ds90ub960-q1.pdf