CX3 connect MAX9296A MiPi issue

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

cross mob
BaZh_4613586
Level 1
Level 1

Hi, every one:

     Recently I met a problem in bring up my device base on cypress cx3.

     The topology of my system is as below:

     Data flow:

      Sensor----->ISP----->MAX9295----->MAX9296A----MiPi-->Cypress CX3

     Control flow is based on I2C from CX3 to each device.

     I using the ov5640 based version, and data from MAX9296 is 1920*1080P30, MiPi config as below:

CyU3PMipicsiCfg_t cfgUvcMyModuleNoMclk =  {

    CY_U3P_CSI_DF_YUV422_8_2,       /* dataFormat   */

    4,                            /* numDataLanes */

    0x1,                          /* pllPrd       */

    62,                           /* pllFbd       */

    CY_U3P_CSI_PLL_FRS_500_1000M,   /* pllFrs      */

    CY_U3P_CSI_PLL_CLK_DIV_8,     /* csiRxClkDiv  */

    CY_U3P_CSI_PLL_CLK_DIV_8,     /* parClkDiv    */

    0x00,                         /* mclkCtl      */

    CY_U3P_CSI_PLL_CLK_DIV_8,     /* mClkRefDiv   */

    1920,                          /* hResolution  */

    0x01                          /* fifoDelay    */

};

But I met 2 question:

    After I call CyU3PMipicsiInit(), I could not using I2C to read and write any device, always return "Err code: 0x4A", but I could do that before I call CyU3PMipicsiInit().

     MAX9296 config ok and data seems transmitted to MiPi interface, but I could not get any data from DMA Call back function. Also I get errcnts from thread CyCx3UvcMipiErrorThread was all zero.

I don't know what wrong with it, could any one help me ?

,

0 Likes
1 Solution

Hello,

From the CX3 Configuration Utility snapshot that you have provided, I can see that you have kept the H-Blanking and V-Blanking values as 0 and this is not correct.

Please put a non-zero value for both as these are recommended.


You can refer to the following thread: the output frame rate of cx3

As mentioned in the above thread,

If you are using the latest CX3 state machine available with SDK 1.3.4, then the minimum vertical blanking required is around 200uS.

If you are using the state machine available with SDK 1.3.3, then the minimum vertical blanking needed is around 500uS.

Please do the suggested changes and share your findings and results.

Regards,

Yashwant

View solution in original post

0 Likes
9 Replies
YashwantK_46
Moderator
Moderator
Moderator
100 solutions authored 50 solutions authored 50 likes received

Hello,

Can you please provide snapshots of your image sensor configuration and receiver configuration from the CX3 configuration utility?


Can you please probe FV and LV and share those traces with me?

What status does CyU3PMipicsiInit() return?

And which API are you using for I2C transfers in your firmware?

"MAX9296 config ok and data seems transmitted to MiPi interface, but I could not get any data from DMA Call back function."

--Does this mean that you are not getting PROD and CONS events in the debug prints?


Regards,

Yashwant

0 Likes

Hi, Yashwant:

In my case, cx3 not connect to sensor directly and receive yuv422 data through MiPi interface, resolution is 1920*1080P30.

CyU3PMipicsiInit() return CY_U3P_SUCCESS.

I use function CyU3PI2cTransmitBytes to write data through I2C, and when error occurs, err code: 0x4A.

H

0 Likes

Hello,

Please refer to the answer of the following thread and check if you might have a similar issue in your design: CX3: AppInit:MipicsiInit Err = 0x4A

Can you clarify the question from earlier response?

"MAX9296 config ok and data seems transmitted to MIPI interface, but I could not get any data from DMA Call back function."

--Does this mean that you are not getting PROD and CONS events in the debug prints?

This one?

Regards,

Yashwant

0 Likes
BaZh_4613586
Level 1
Level 1

Hi, Yashwant:

It seems my case is different from the above case, and in my case the init procedure seems all right. And my customer board I2C address is different from 0x0E(W) and 0x0F(R).

For I2C issue, I found it will worked still if I call "CyU3PMipicsiSetSensorControl(CY_U3P_CSI_IO_XRES | CY_U3P_CSI_IO_XSHUTDOWN, CyTrue)" after calling CyU3PMipicsiInit().

For the dma not call the callback function issue, yes, I not getting PROD and CONS events in the debug prints. If I configure the output of my board and mipi data should be ready, the I found uart will be stuck and no any output print. That's why?

0 Likes

Hello,


Can you please probe the I2C lines with an analyzer and share the I2C traces when you see the issue and when it is working fine?

Also, in the DMA channel creation, have you set this:    

dmaCfg.notification         = CY_U3P_DMA_CB_PROD_EVENT | CY_U3P_DMA_CB_CONS_EVENT;

You should have this notification or else you won't get PROD and CONS events even when they are generated.

Regards,
Yashwant

0 Likes
BaZh_4613586
Level 1
Level 1

Hi, Yashwant:

For I2C issue it can be work fine after call CyU3PMipicsiSetSensorControl(CY_U3P_CSI_IO_XRES | CY_U3P_CSI_IO_XSHUTDOWN, CyTrue).

For DMA issue, I config dmaCfg.notification as your way. I arrange the sequence of mipi and sensor config. It seems I could get dma call back, but the problem is I only get few and then nothing else, log as below(I add log print when dma call back function when called):

CyCx3UvcAppDmaCallback type: 0x08

CyCx3UvcAppDmaCallback type: 0x08

CyCx3UvcAppDmaCallback type: 0x08

CyCx3UvcAppDmaCallback type: 0x08

CyCx3UvcAppDmaCallback type: 0x10

CyCx3UvcAppDmaCallback type: 0x08

CyCx3UvcAppDmaCallback type: 0x08

Only such few will be print, and no more.

H

0 Likes

Hello,


Are you able to use the I2C after CyU3PMipicsiSetSensorControl() API and without the 0x4A error?

Also, can you share the I2C analyzer traces when you use CyU3PI2cTransmitBytes() API after CyU3PMipicsiInit() API.


Also, please share the CX3 Configuration Utility snapshots for the receiver configuration and the image sensor configuration.

Also, please share the full UART debug logs with me so that I can see what is going wrong.

Is it possible for you to share your firmware so that I can understand where the debug prints are coming from?

Regards,

Yashwant

0 Likes
BaZh_4613586
Level 1
Level 1

For question: Are you able to use the I2C after CyU3PMipicsiSetSensorControl() API and without the 0x4A error?

Answer: Yes

For question: can you share the I2C analyzer traces when you use CyU3PI2cTransmitBytes() API after CyU3PMipicsiInit() API.

Answer: It seems not signal could receive in daughter board I2C interface if not calling CyU3PMipicsiSetSensorControl after CyU3PMipicsiInit.

Cx3 configuration as below:

https://drive.google.com/file/d/10cQrBx6tCbZvpcIorTELsRwx2yvyDpFJ/view?usp=sharing

And image sensor mipi config:

2 lane, 800Mbps, 1920*1080p30

Full debug log and correspond code:

https://drive.google.com/file/d/1SA7VdMKmcnbaKss9I5WGpOxRGSTLQs1-/view?usp=sharing

https://drive.google.com/file/d/1rkACAF18738wm2Fp4-UdXYak-aKpePf3/view?usp=sharing

0 Likes

Hello,

From the CX3 Configuration Utility snapshot that you have provided, I can see that you have kept the H-Blanking and V-Blanking values as 0 and this is not correct.

Please put a non-zero value for both as these are recommended.


You can refer to the following thread: the output frame rate of cx3

As mentioned in the above thread,

If you are using the latest CX3 state machine available with SDK 1.3.4, then the minimum vertical blanking required is around 200uS.

If you are using the state machine available with SDK 1.3.3, then the minimum vertical blanking needed is around 500uS.

Please do the suggested changes and share your findings and results.

Regards,

Yashwant

0 Likes