cx3 应用中mipi 的clk 和data信号信号是支持连续模式还是不连续模式,还是都支持呢?

公告

大中华汽车电子生态圈社区并入开发者社区- 更多资讯点击此

Tip / 登入 to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
hant1216
Level 2
Level 2
10 replies posted 10 sign-ins 5 replies posted

1、现在我们自己的应用是使用fpga输出mipi格式的yuv422视频数据,接到3065上进行解析,1080 30fps .现在配置完成后mipi数据解析不出来,dma数据没有出来,串口调试打开了,对应的解析出来的参数没有打印。pclk测试点有时钟,但是其他两个测试点没有数据。现在能看到的是mipi数据的clk 是mipi非连续模式下的数据。3065对这个模式有要求吗?

2、cx3 mipi 输入参数设置中,H-Blanking 和V-Blanking 这两个参数设置是会起作用的吗? 这个消影时间是输入mipi信号的消影时间吗?mipi信号是包含了这个信息?现在这个参数是工程建立时候的默认值。

企业微信截图_16285928071746.png

企业微信截图_16285929041468.png

0 点赞
1 解答
YiZ_31
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

1.我们能确认3065这边mipi的状态吗?怎么确认MIPI已经进入HS状态

=>这个都是自动进入的,您可以量取MIPI的波形确认。3065这边没有方法可以确认。

2.MIPI ECC和CRC错误会不会有影响mipi的解析

=>当然会

3. FS (Frame Start )和FE(Frame End)的WC(Word Count)值可以为0吗

=>不是很清楚这几个参数,是在哪里设置的?

4.HS PREPARE和HS ZERO的参数怎么设置。现在默认的是多少呢?

=>根据您的传感器设置,请咨询传感器供应商

5.行与行的LPS时间是不是有要求

=>H-blanking没有要求,V-Blanking最少要有200us,否则会导致帧缺失

在原帖中查看解决方案

0 点赞
8 回复数
YiZ_31
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

都支持的,默认的是Gated Mode,Continuous Mode需要对固件作相应修改。这里有写:

https://community.cypress.com/t5/Knowledge-Base-Articles/CX3-Hardware-Frequently-Asked-Questions-KBA...

H-Blanking 和V-Blanking 会起作用,而且很重要,这个就是解析出来的行场信号的低电平,计算在总数据量之内。

0 点赞
hant1216
Level 2
Level 2
10 replies posted 10 sign-ins 5 replies posted

您好,感谢您的回复。

1、您说默认的是Gated Mode,Continuous Mode需要对固件作相应修改。我根据您附的链接看到的信息中

  • Question: Will CX3 support “Continuous MIPI clock” and “gated MIPI clock” modes?

    Answer: Yes. CX3 support both clock modes. The CX3 chip recognizes the CSI clock by MIPI CSI LP to HS mode transition at the beginning. Therefore, after finishing the initialization of the CX3 MIPI bridge, the CSI clock must transit from LP to HS mode. You should use the following sequence in firmware if you are using the sensor in “continuous clock mode.”

    • Upon receiving the Set_Cur (Commit control) request from the host, perform a MIPI reset (CyU3PMipicsiReset() with the reset type as Hard reset ).
    • Initialize the MIPI bridge (CyU3PMipicsiInit () )
    • Set the MIPI interface parameters (CyU3PMipicsiSetIntfParams ()).
    • Release the reset of the sensor (XRST) (CyU3PMipicsiSetSensorControl() ).
    • Configure the sensor.
  • 这个说明是会都支持gate mode 和continuous clock mode。着重说明了配置流程是sensor 的continuous clock mode。我查看了工程,工程默认配置的就是这个流程。是否这里有出入呢?这里默认设置成了continuous clock mode。在CyCx3UvcAppInit()这个函数中实现的上述流程。但是是没看到a步骤中CyU3PMipicsiReset() 函数的调用。
  • 还有就是什么地方有说明gate mode 是什么流程来配置吗?

2、现在我们这里去修改成了连续模式来进行输出mipi数据。仍然是没有解析出mipi数据。请教下我该从哪个方向查这个问题呢? 是mipi解析器没工作呢?还是信号解析失败呢?现在看不到这些信息。我现在能看到的就是只有dma数据没有输出。测试点HSYNC test signal   VSYNC test signal 没有信号。但是PCLK test signal是有信号的,频率也是对的.

 

0 点赞
YiZ_31
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

首先你要改成continuous clock mode, 默认的是gate mode。其实要作的修改只是在CyCx3AppHandleSetCurReq里面加一句CyU3PMipicsiReset() ,默认的是没有的。

模式错误是肯定解析不出来的。其次你这个configuration 也要填对,你这个blanking 都不知道那是肯定配不对的。

0 点赞
hant1216
Level 2
Level 2
10 replies posted 10 sign-ins 5 replies posted

好的,我确实是没找到CyU3PMipicsiReset( )这个函数。 我添加到CyCx3AppHandleSetCurReq()中试下。是在这个函数什么位置加呢

static void
CyCx3AppHandleSetCurReq (
uint16_t wValue
)
{
CyU3PReturnStatus_t status;
uint16_t readCount = 0;

/* Get the UVC probe/commit control data from EP0 */
status = CyU3PUsbGetEP0Data(CX3_APP_MAX_PROBE_SETTING_ALIGNED, glCommitCtrl, &readCount);
if (status != CY_U3P_SUCCESS)
{
CyU3PDebugPrint (4, "\n\rUSB Setup CB:SET_CUR:GetEP0Data Err = 0x%x", status);
return;
}

/* Check the read count. Expecting a count of CX3_APP_MAX_PROBE_SETTING bytes. */
if (readCount > (uint16_t)CX3_APP_MAX_PROBE_SETTING)
{
CyU3PDebugPrint (4, "\n\rUSB Setup CB:Invalid SET_CUR Rqt Len");
return;
}

/* Set Probe Control */
if (wValue == CX3_APP_VS_PROBE_CONTROL)
{
glCurrentFrameIndex = glCommitCtrl[3];
}
else
{
/* Set Commit Control and Start Streaming*/
if (wValue == CX3_APP_VS_COMMIT_CONTROL)
{
CyCx3AppImageSensorSetVideoResolution (glCommitCtrl[3]);

if (glIsApplnActive)
{
#ifdef CX3_DEBUG_ENABLED
CyU3PDebugPrint (4, "\n\rUSB Setup CB:Call AppSTOP1");
#endif
CyCx3AppStop();
}

CyCx3AppStart();
}
}
}

是不是需要在CyCx3AppStart();  这个函数前面加就可以了。

2、之前在配置sensor  ov 2740的时候,就是使用的默认的工程,但是示波器看sensor的mipi  clk信号是continuous clock mode 。 这个数据是能正常解析的。这一点也是比较疑惑的点。我没有主动添加CyU3PMipicsiReset( ) 这个函数

3、我这里也在确定消影时间

0 点赞
hant1216
Level 2
Level 2
10 replies posted 10 sign-ins 5 replies posted

您好,我再请教个问题。PHY时延 现在是默认值是9吗?

企业微信截图_16287483547343.png

我在这个位置看到了这个信息。。现在需要修改这个值,我通过CyU3PMipicsiSetPhyTimeDelay()这个函数来修改,我放到了CyU3PMipicsiSleep();这个函数之后调用的CyU3PMipicsiSetPhyTimeDelay。   

对于CyU3PMipicsiSetPhyTimeDelay 这个函数中第一个传参,我想请教个问题, uint8_t tdTerm, /**< TD TERM Selection for MIPI CSI-2 reciever PHY. Valid values 0 and 1. */ 。这个参数是怎么设置呢? 没看到有说明MIPI CSI-2 reciever PHY 有两个。怎么确定当前是使用的哪个呢?

0 点赞
YiZ_31
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

这个参数选1即可。

0 点赞
hant1216
Level 2
Level 2
10 replies posted 10 sign-ins 5 replies posted

再向您请教几个问题。

1.我们能确认3065这边mipi的状态吗?怎么确认MIPI已经进入HS状态

2.MIPI ECC和CRC错误会不会有影响mipi的解析

3. FS (Frame Start )和FE(Frame End)的WC(Word Count)值可以为0吗

4.HS PREPARE和HS ZERO的参数怎么设置。现在默认的是多少呢?

5.行与行的LPS时间是不是有要求

谢谢

0 点赞
YiZ_31
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

1.我们能确认3065这边mipi的状态吗?怎么确认MIPI已经进入HS状态

=>这个都是自动进入的,您可以量取MIPI的波形确认。3065这边没有方法可以确认。

2.MIPI ECC和CRC错误会不会有影响mipi的解析

=>当然会

3. FS (Frame Start )和FE(Frame End)的WC(Word Count)值可以为0吗

=>不是很清楚这几个参数,是在哪里设置的?

4.HS PREPARE和HS ZERO的参数怎么设置。现在默认的是多少呢?

=>根据您的传感器设置,请咨询传感器供应商

5.行与行的LPS时间是不是有要求

=>H-blanking没有要求,V-Blanking最少要有200us,否则会导致帧缺失

0 点赞