CX3 get no dma buffer and no mipi error message

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

cross mob
Lisk_4309131
Level 1
Level 1

Hi all,

I meet a somehow issue on cx3 board. I have two cameras with isp (image signal processor) in it. On is 720p and the other is 1080p. I used configuration tool to generate my code.  It works on 720p but not on 1080p.  I found that it seem to have no dma buffer after initializing on 1080p, but it worked fine on another platform i.mx6. below are my

configuration:

cx3_1080p.jpg

all checks are pass after adjust parameters and my log is below:

MipiErrorThread Init.

bRType = 0x81, bRequest = 0x0, wValue = 0x0, wIndex = 0x0, wLength= 0x2

bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x100, wLength= 0x0

StpCB:In SET_FTR 0::1

bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x0, wLength= 0x0

StpCB:In SET_FTR 0::1

bRType = 0xA1, bRequest = 0x87, wValue = 0x1400, wIndex = 0x100, wLength= 0xA

AppInit:GpifSMStart passed

bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x100, wLength= 0x0

StpCB:In SET_FTR 0::1

bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x0, wLength= 0x0

StpCB:In SET_FTR 0::1

bRType = 0xA1, bRequest = 0x81, wValue = 0x100, wIndex = 0x1, wLength= 0x22

bRType = 0x21, bRequest = 0x1, wValue = 0x100, wIndex = 0x1, wLength= 0x22

bRType = 0xA1, bRequest = 0x81, wValue = 0x100, wIndex = 0x1, wLength= 0x22

bRType = 0xA1, bRequest = 0x83, wValue = 0x100, wIndex = 0x1, wLength= 0x22

bRType = 0xA1, bRequest = 0x82, wValue = 0x100, wIndex = 0x1, wLength= 0x22

bRType = 0x21, bRequest = 0x1, wValue = 0x300, wIndex = 0x1, wLength= 0xB

Set cur Still probe index = 1

bRType = 0xA1, bRequest = 0x81, wValue = 0x300, wIndex = 0x1, wLength= 0xB

Get cur Still probe index = 1

bRType = 0xA1, bRequest = 0x82, wValue = 0x300, wIndex = 0x1, wLength= 0xB

Get cur Still probe index = 1

bRType = 0xA1, bRequest = 0x83, wValue = 0x300, wIndex = 0x1, wLength= 0xB

Get cur Still probe index = 1

bRType = 0x21, bRequest = 0x1, wValue = 0x300, wIndex = 0x1, wLength= 0xB

Set cur Still probe index = 1

bRType = 0xA1, bRequest = 0x81, wValue = 0x300, wIndex = 0x1, wLength= 0xB

Get cur Still probe index = 1

bRType = 0xA1, bRequest = 0x82, wValue = 0x300, wIndex = 0x1, wLength= 0xB

Get cur Still probe index = 1

bRType = 0xA1, bRequest = 0x83, wValue = 0x300, wIndex = 0x1, wLength= 0xB

Get cur Still probe index = 1

bRType = 0x21, bRequest = 0x1, wValue = 0x200, wIndex = 0x1, wLength= 0x22

CyCx3UvcAppHandleSetCurReq

CyCx3UvcAppStart

AplnStrt:SMState = 0x2

It seemed to be perfect due to no any mipi error, but actually it didn't have dma callback event.

could anyone direct me how to resolve it ?

Any reply will be appreciated !

0 Likes
1 Solution

Hello Skyller,

PROD event occurs when the DMA buffer is fully filled and the CONS event occurs the when the DMA buffer is consumed by the consumer.

DMA call back is triggered when these events occur.

In the DMA call back function

   if (type == CY_U3P_DMA_CB_PROD_EVENT)

    {

        /* This is a produce event notification to the CPU. This notification is

         * received upon reception of every buffer. The buffer will not be sent

         * out unless it is explicitly committed. The call shall fail if there

         * is a bus reset / usb disconnect or if there is any application error. */

Please confirm that are you getting the PROD events. If no, the data is not received by the CX3 (no filling of DMA buffers).

You can check the PROD events are generated or not by incrementing a variable in the dma call back  and then printing it's value in the for{} loop

OR

if the project is generated by CX3 configuration utility you can enable the PRINT_FRAME_INFO in the default firmware to check the prod and cons events

for example the for {} will be having this prints by enabling PRINT_FRAME_INFO:

CyU3PDebugPrint(4,"\n\rProd = %d Cons = %d  Prtl_Sz = %d Frm_Cnt = %d Frm_Sz = %d B", TxCountflag, RxCountflag, PartialBufSize, FrameCount, ((TxCountflag*CX3_UVC_DATA_BUF_SIZE)+PartialBufSize));

Printflag = 0;

To receive video data properly the CX3 configuration utility should be in sync with the sensor output. If both of them i.e sensor output and CX3 configuration utility don't match the video data will not be received properly.

>>I tried the test and and had same result

Did you change the sensor settings accordingly.

Regards,

Rashi

Regards,
Rashi

View solution in original post

0 Likes
8 Replies
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello Lin,

Please probe the FV, LV and  PCLK lines and share the traces. Also check the the sensor is configured properly

Regards,

Rashi

Regards,
Rashi
0 Likes

Hi Rashi,,

Thanks for your reply. Unfortunately,  I cannot get such track lines as test point in my board.  That's one of the reason what I do confusion. I cannot get any measurement in my cx3 system. What I can do is to make sure the signal from front end to mip csi interface of cx3 is right.

Actually, my front end is ti954 deserializer as receiver which get video signal from remote end ti953 serializer with AR0233 sensor. I check ti954 registers, it do get  & lock the signal and send it to cx3 board through mipi csi2 interface. My another platform i.max6 has same hardware  and do same initial process, but it can show video image normally. So I think the front end is OK. It may be configuration tool issue or somewhere I don't know.  Could you or somebody please offer me 1080p configuration example ? or some impossble directions I can try ?

Thanks a lot.

Sincerely,

skyller

0 Likes

Hello Skyller,

Please refer to the attached mipi configuration from OV5640 example of SDK

mipi_1080p.PNG

How do you check the prod and cons event? Are you using the default firmware generated from CX3 receiver utility as per this KBA Steps to Setup up MIPI CSI Camera Solution with CX3 – KBA225748Steps to Setup up MIPI CSI Camera Solution with CX3 – KBA225748

Regards,

Rashi

Regards,
Rashi
0 Likes

Hi Rashi,

Thanks for your mipi configuration example. I tried the test and and had same result. My project generated from the defalut fimware generation of cx3 configuration tool as the guide mentioned in CX3-KBA225748. For my poor knowledge, could you advise what's the prod and cons event ?

0 Likes

Hello Skyller,

PROD event occurs when the DMA buffer is fully filled and the CONS event occurs the when the DMA buffer is consumed by the consumer.

DMA call back is triggered when these events occur.

In the DMA call back function

   if (type == CY_U3P_DMA_CB_PROD_EVENT)

    {

        /* This is a produce event notification to the CPU. This notification is

         * received upon reception of every buffer. The buffer will not be sent

         * out unless it is explicitly committed. The call shall fail if there

         * is a bus reset / usb disconnect or if there is any application error. */

Please confirm that are you getting the PROD events. If no, the data is not received by the CX3 (no filling of DMA buffers).

You can check the PROD events are generated or not by incrementing a variable in the dma call back  and then printing it's value in the for{} loop

OR

if the project is generated by CX3 configuration utility you can enable the PRINT_FRAME_INFO in the default firmware to check the prod and cons events

for example the for {} will be having this prints by enabling PRINT_FRAME_INFO:

CyU3PDebugPrint(4,"\n\rProd = %d Cons = %d  Prtl_Sz = %d Frm_Cnt = %d Frm_Sz = %d B", TxCountflag, RxCountflag, PartialBufSize, FrameCount, ((TxCountflag*CX3_UVC_DATA_BUF_SIZE)+PartialBufSize));

Printflag = 0;

To receive video data properly the CX3 configuration utility should be in sync with the sensor output. If both of them i.e sensor output and CX3 configuration utility don't match the video data will not be received properly.

>>I tried the test and and had same result

Did you change the sensor settings accordingly.

Regards,

Rashi

Regards,
Rashi
0 Likes

Hi Rash,

Thanks for  your detailed description about PROD and CONS event. Yes, I have open dma notification with CY_U3P_DMA_CB_PROD_EVENT and CY_U3P_DMA_CB_CONS_EVENT.  In fact, I got my 720p log with print info as below :

Prod = 50 Cons = 50  Prtl_Sz = 2400 Frm_Cnt = 29 Frm_Sz = 1843200 B

Prod = 50 Cons = 50  Prtl_Sz = 2400 Frm_Cnt = 30 Frm_Sz = 1843200 B

TimeDiff = 998 ms FPS = 30

....................

So , I believe that my program is right for 720p. But my 1080p is wrong due to have no any event of dma. In other words, whether I can suppose no signal input mipi csi2 if no any prod or cons event occur, right ?  or there are other possible reasons ?

>> Did you change the sensor settings accordingly.

     Yes, certainly.

Regards,

skyller

0 Likes

Hello Skyller,

But my 1080p is wrong due to have no any event of dma. In other words, whether I can suppose no signal input mipi csi2 if no any prod or cons event occur, right ?  or there are other possible reasons ?

>> yes, no prod events would ,mean that video data from mipi is not coming properly. This is the reason i had asked for the FV, LV and PCLK traces to check the data from sensor is coming proper or not.

Regards,

Rashi

Regards,
Rashi
0 Likes

Hi Rashi,

Understand. Perhaps my direction is wrong. I'll keep focus on front end signal.

Thanks for your great support.

Regards,

skyller

0 Likes