1 2 Previous Next 27 Replies Latest reply on Sep 3, 2019 4:27 PM by DoLe_3354741

    Is "2592x1944x1 byte in High speed(USB 2.0)" possible with FX3?

    DoLe_3354741

      Hi,

       

      I've  already completed "2592x1944x1(Y8) or 2 bytes(Y16 to Y)" CMOS sensor(MT9P031, 12 bit gray color) in Super Speed(USB 3.0).

       

      And, I also want to use "2592x1944x1 byte(Y8)" in High speed with FX3.

       

      I tried the following DMA buffer size and "1280x720x1byte in High speed" is working well.   But 2592x1944x1byte is not working.

      ---------------------------- <ref.: https://community.cypress.com/thread/35193?start=0&tstart=0 >

      ...

      2. Increase the DMA buffer size to 48*1024 bytes and DMA buffer count to 2 while creating the DMA channel using CyU3PDmaMultiChannelCreate API

         a. Change the 0x00, 0xC0, 0x00, 0x00, /* No. of bytes device can rx in single payload = 48 KB */ in probe control structures

         b. Change the GPIF LD_DATA_COUNT and LD_ADDR_COUNT as per Configuring Buffer Sizes in AN75779 UVC Firmware – KBA90744

         c. i.e. LD_DATA_COUNT = LD_ADDR_COUNT = ((48*1024 -12-4)/2) -1 = 24567  ->  I changed this to ((48*1024 -12-4)/1) -1 = 49135

      ...

      ------------------------------

       

        I also tried 64*1024 DMA size but there was a error message like...

      ------------------------------ Error message on Serial debugging

      DMA Channel Creation Failed, Error Code = 64

      Error handler...

      Error handler...

      ...

      -----------------------------------

       

      How to change DMA buffer size or anything else ?

       

      Thanks a lot!

       

      Don

        • 1. Re: Is "2592x1944x1 byte in High speed(USB 2.0)" possible with FX3?
          RashiV_61

          Hello Don,

           

          USB 2.0  can support maximum bandwidth of 60 MBps. What is the fps that you are using?

          The video bandwidth 2592 X 1944 x 1 x fps <= 60 MBps for streaming.

           

          The changes you did for buffer size seems fine.(48KB)

           

          The maximum buffer size that FX3 architecture supports is 0xFFF0 i.e. 65520 bytes.

          By changing the buffer size to 64 KB = 65536, it exceeds the max value supported.

           

          Regards,

          Rashi

          • 2. Re: Is "2592x1944x1 byte in High speed(USB 2.0)" possible with FX3?
            DoLe_3354741

            Hi Rashi,

             

            Thanks for your answer.

             

            Then, I want you to check my 64KB settings whether they are correct.

             

            // GPIF II Designer

            ((64*1024 - 12-4)/1byte)-1 = 65519   -> LD_ADDR_COUNT, LD_DATA_COUNT = 65519

            -----------------

            // uvc.h

            #define CY_FX_EP_BULK_VIDEO_PKTS_COUNT  (0x40) //.-> 64

            #define CY_FX_UVC_STREAM_BUF_COUNT      (?)    // Which value?

            -----------------

            // uvc.c    64 * 1024 = 65536

            uint8_t glProbeCtrl20[CY_FX_UVC_MAX_PROBE_SETTING] = {

            ...

            0x00, 0x00, 0x01, 0x00,          /* Max video frame size in bytes */

            ...

            }

             

            Are those correct?   And which value is  CY_FX_UVC_STREAM_BUF_COUNT   ?

             

            Thanks,

             

            Don

            • 3. Re: Is "2592x1944x1 byte in High speed(USB 2.0)" possible with FX3?
              RashiV_61

              Hello Don,

               

              It seems you have kept the buffer size of 64 KB, which will give the error= 64, as per your previous post. You cannot use buffer size of 64 KB

               

              You have to reduce the DMA buffer size. You can use 48 KB. The maximum buffer size can be 65,520 bytes.

               

              For changing the buffer size you can make changes here

              #define CY_FX_EP_BULK_VIDEO_PKT_SIZE    (0x400)        // Packet size  (1024)

              #define CY_FX_EP_BULK_VIDEO_PKTS_COUNT  (0x10)     //  Packet count (16)  >> You can increase this value to 48

               

              #define CY_FX_UVC_STREAM_BUF_SIZE       (CY_FX_EP_BULK_VIDEO_PKTS_COUNT * CY_FX_EP_BULK_VIDEO_PKT_SIZE)  /* 16 KB */ >> This gives you the buffer size

               

              #define CY_FX_UVC_STREAM_BUF_COUNT      (4)     >> This will give the buffer count. By default it is set to 4. You can set it as per your requirement. (memory size would be the limitation)

               

              Similarly, you need to make changes to LD_ADDR_COUNT, LD_DATA_COUNT.

               

              Please confirm that this condition is fulfilled  >>The video bandwidth 2592 X 1944 x 1 x fps <= 60 MBps for streaming in High Speed.

               

               

               

              Regards,

              Rashi

              • 4. Re: Is "2592x1944x1 byte in High speed(USB 2.0)" possible with FX3?
                DoLe_3354741

                  Hi Rashi,

                 

                Thanks for your answer.

                 

                By the way, I don't know why I cannot use the buffer size of 64KB.   I use CYUSB3014, 512 KB SRAM size.

                 

                Anyway, I tried your settings you mentioned( I have already used the buffer size of 48 KB because the next larger size, 64 KB is not working with error message)  .   The result is that Super speed is working but High speed repeatedly shows this error message.

                ...

                DMA Reset Event: Commit buffer failure

                Application Stopped

                Application Started

                DMA Reset Event: Commit buffer failure

                ...

                 

                Please check my source code as follows.

                 

                Thanks,

                 

                Don

                 

                P.S.: As you know, in my source code, sonsor.c is from MT9P031 NOT from Cypress.   By the way, When I set Binning & Skipping registers(MT9P031_ROW_ADDRESS_MODE, MT9P031_COLUMN_ADDRESS_MODE)   by 0x11,   even though the maximum resolution limit is until 1296x972 but it is working on High speed USB.   But when I don't use the Binning & Skipping in the same 1296x972 resolution for test, it's NOT working.  Maybe without binning & skipping, any resolution doesn't work.   I know you are not OnSemi's persion but do you know any reason ?

                 

                ----------------- uvc.h

                /* UVC Video Streaming Endpoint Packet Size */

                #define CY_FX_EP_BULK_VIDEO_PKT_SIZE    (0x400)       /* 1024 Bytes */

                 

                /* UVC Video Streaming Endpoint Packet Count */

                #define CY_FX_EP_BULK_VIDEO_PKTS_COUNT  (0x30)   // This is 48 KB

                 

                /* DMA buffer size used for video streaming. */

                #define CY_FX_UVC_STREAM_BUF_SIZE       (CY_FX_EP_BULK_VIDEO_PKTS_COUNT * CY_FX_EP_BULK_VIDEO_PKT_SIZE)  /* default: 16 KB */

                 

                /* Number of DMA buffers per GPIF DMA thread. */

                #define CY_FX_UVC_STREAM_BUF_COUNT      (2)   // -> In my case, more than (2) makes error as follows.   So, I use (2).

                DMA Channel Creation Failed, Error Code = 16

                                                            Error handler...

                Error handler...

                Error handler...

                ...

                ------------------- GPIF II Designer

                LD_ADDR_COUNT, LD_DATA_COUNT =>    ((48*1024 -12-4)/1) -1 = 49135

                 

                ------------------- uvc.c

                uint8_t glProbeCtrl20[CY_FX_UVC_MAX_PROBE_SETTING] = {

                ...

                0x00, 0xC0, 0x00, 0x00,     // 48KB     /* No. of bytes device can rx in single payload = ... */

                ...

                 

                ------------------ sensor.c

                ...

                    ret = SensorWriteAll_1B_Addr (SENSOR_ADDR_WR, MT9P031_ROW_START, MT9P031_ROW_START_DEF); // 0x01

                    ret = SensorWriteAll_1B_Addr (SENSOR_ADDR_WR, MT9P031_COLUMN_START, MT9P031_COLUMN_START_DEF); // 0x02

                    ret = SensorWriteAll_1B_Addr (SENSOR_ADDR_WR, MT9P031_WINDOW_HEIGHT, 1943); // 0x03=1944-1

                    ret = SensorWriteAll_1B_Addr (SENSOR_ADDR_WR, MT9P031_WINDOW_WIDTH, 2591); // 0x04=2592-1

                 

                 

                    ret = SensorWriteAll_1B_Addr (SENSOR_ADDR_WR, MT9P031_HORIZONTAL_BLANK, 0x0000); // 0x05=0

                    ret = SensorWriteAll_1B_Addr (SENSOR_ADDR_WR, MT9P031_VERTICAL_BLANK, 0x0000); // 0x06=0

                 

                 

                    ret = SensorWriteAll_1B_Addr (SENSOR_ADDR_WR, MT9P031_SHUTTER_WIDTH_LOWER, 0x0400); // 0x09 INTEG_TIME_REG=1024

                 

                 

                    ret = SensorWriteAll_1B_Addr (SENSOR_ADDR_WR, MT9P031_ROW_ADDRESS_MODE, 0x0000); // 0x22 ROW_MODE, ROW_SKIP=1. ROW_BIN=1

                    ret = SensorWriteAll_1B_Addr (SENSOR_ADDR_WR, MT9P031_COLUMN_ADDRESS_MODE, 0x0000); // 0x23 COL_MODE, COL_SKIP=1. COL_BIN=1

                    ret = SensorWriteAll_1B_Addr (SENSOR_ADDR_WR, MT9P031_READ_MODE_2, 0x0060); // 0x20 READ_MODE_2, COL_SUM

                    ret = SensorWriteAll_1B_Addr (SENSOR_ADDR_WR, MT9P031_SHUTTER_WIDTH_UPPER, 0x0000); // 0x08 (1) SHUTTER_WIDTH_HI

                    ret = SensorWriteAll_1B_Addr (SENSOR_ADDR_WR, MT9P031_SHUTTER_WIDTH_LOWER, 0x05AF); // 0x09 (1) INTEG_TIME_REG

                    ret = SensorWriteAll_1B_Addr (SENSOR_ADDR_WR, MT9P031_SHUTTER_DELAY, 0x0000); // 0x0C (1) SHUTTER_DELAY_REG

                 

                ...

                • 5. Re: Is "2592x1944x1 byte in High speed(USB 2.0)" possible with FX3?
                  RashiV_61

                  Hello Don,

                   

                  - You can refer to this KBA for the understanding of  buffer count DMA Buffer Count - KBA218339

                  - The DMA commit buffer failure error may occur if the UVC host application does not issue IN tokens fast enough to clear the DMA buffers.It seems it is due to "high speed" bandwidth limitation. You have not mentioned the frames per second (fps) here. High speed will work better for < 30MBps (It seems 60 MBps is theoretical)

                  -  Please reduce the frames per second (fps) to match this bandwidth. For 2592 X 1944 X 1 frame size you can try with 5 fps for high speed.

                  - If reducing the fps doesn't work also try reducing buffer size back to 16 KB.

                   

                  It will take time to check with the sensor problem you mentioned in the post. Will get back on it.

                  Please let me know the results after testing both.

                   

                  Regards,

                  Rashi

                  • 6. Re: Is "2592x1944x1 byte in High speed(USB 2.0)" possible with FX3?
                    DoLe_3354741

                    Hello Rashi,

                     

                    Thanks for the help.

                     

                    1)  I already reduced the fps to just 1 fps as follows...

                     

                    ---------------------- uvc.c

                    uint8_t glProbeCtrl20[CY_FX_UVC_MAX_PROBE_SETTING] = {

                    ...

                    0x80, 0x96, 0x98, 0x00, // 1 fps,  /* Desired frame interval in the unit of 100ns: 1 fps */

                    ...

                    0x00, 0xE3, 0x4C, 0x00, // 2592x1944x1=     5,038,848   /* Max video frame size in bytes */

                    ...

                     

                    --------------------- cyfxuvcdscr.c

                    /* Standard High Speed Configuration Descriptor */

                    const uint8_t CyFxUSBHSConfigDscr[] = {

                    ...

                    0x00, 0x18, 0x67, 0x02,  // 2592x1944x1x 1x8=    40,310,784   wid x ht x bytes/pixel x fps x 8 bits  /* Min bit rate bits/s. Not specified, taken from MJPEG */

                    0x00, 0x18, 0x67, 0x02,  // same above                                     /* Max bit rate bits/s. Not specified, taken from MJPEG */

                    ...

                    0x80, 0x96, 0x98, 0x00, // 10,000,000-> 1 fps   /* Default Frame Interval */

                    0x01,

                    0x80, 0x96, 0x98, 0x00,

                    ...

                     

                    2) I already tested the buffer size back to 16 KB with CY_FX_UVC_STREAM_BUF_COUNT  = (4) or (6).   The result was almost the same that 48 KB.

                     

                    By the way, I already mentioned in the previous reply, my guess is that... 

                      A: whenever I set the binning & skiiping  of MT9P031 CMOS image sensor to 0x00(No binning & skipping), High speed USB2 doesn't work. 

                      B: in relation to A, CMOS sensor register settings don't seem to match FX3 in High speed mode.

                     

                    Do you have any idea ?

                     

                    I'll do my best.

                     

                    Thanks,

                     

                    Don

                    • 7. Re: Is "2592x1944x1 byte in High speed(USB 2.0)" possible with FX3?
                      RashiV_61

                      Hello Don,

                       

                      - Let us work for the case where binning and skipping are not enabled or set to 0x00. Please probe the FV, LV, and clock lines and share the traces.

                      - The changes that you have made in the descriptor and the firmware seems fine.

                       

                      Regards,

                      Rashi

                      • 8. Re: Is "2592x1944x1 byte in High speed(USB 2.0)" possible with FX3?
                        DoLe_3354741

                        Hi Rashi,

                         

                        Thanks for your reply.

                         

                        Yes, I just checked 1296x972(5 fps, 48K DMA buffer size, Y8) both with skipping & binning(working) and without them(not working).

                         

                        Please refer to the following register settings and oscilloscope pictures for both mode.

                         

                        Thanks,

                         

                        Don

                         

                        ------------ with Skipping & binning (Working)

                        ...

                            ret = SensorWriteAll_1B_Addr (SENSOR_ADDR_WR, MT9P031_ROW_START, MT9P031_ROW_START_DEF); // 0x01 <- 54

                            ret = SensorWriteAll_1B_Addr (SENSOR_ADDR_WR, MT9P031_COLUMN_START, MT9P031_COLUMN_START_DEF); // 0x02 <- 16

                            ret = SensorWriteAll_1B_Addr (SENSOR_ADDR_WR, MT9P031_WINDOW_HEIGHT, 1943); // 0x03

                            ret = SensorWriteAll_1B_Addr (SENSOR_ADDR_WR, MT9P031_WINDOW_WIDTH, 2591); // 0x04

                         

                         

                            ret = SensorWriteAll_1B_Addr (SENSOR_ADDR_WR, MT9P031_HORIZONTAL_BLANK, 0x0000); // 0x05=0

                            ret = SensorWriteAll_1B_Addr (SENSOR_ADDR_WR, MT9P031_VERTICAL_BLANK, 0x0000); // 0x06=0

                         

                         

                            ret = SensorWriteAll_1B_Addr (SENSOR_ADDR_WR, MT9P031_SHUTTER_WIDTH_LOWER, 0x0400); // 0x09 INTEG_TIME_REG=1024

                         

                         

                            ret = SensorWriteAll_1B_Addr (SENSOR_ADDR_WR, MT9P031_ROW_ADDRESS_MODE, 0x0011); // 0x22 ROW_MODE, ROW_SKIP=1. ROW_BIN=1

                            ret = SensorWriteAll_1B_Addr (SENSOR_ADDR_WR, MT9P031_COLUMN_ADDRESS_MODE, 0x0011); // 0x23 COL_MODE, COL_SKIP=1. COL_BIN=1

                            ret = SensorWriteAll_1B_Addr (SENSOR_ADDR_WR, MT9P031_READ_MODE_2, 0x0060); // 0x20 READ_MODE_2, COL_SUM

                            ret = SensorWriteAll_1B_Addr (SENSOR_ADDR_WR, MT9P031_SHUTTER_WIDTH_UPPER, 0x0000); // 0x08 (1) SHUTTER_WIDTH_HI

                            ret = SensorWriteAll_1B_Addr (SENSOR_ADDR_WR, MT9P031_SHUTTER_WIDTH_LOWER, 0x05AF); // 0x09 (1) INTEG_TIME_REG

                            ret = SensorWriteAll_1B_Addr (SENSOR_ADDR_WR, MT9P031_SHUTTER_DELAY, 0x0000); // 0x0C (1) SHUTTER_DELAY_REG

                        ...

                         

                        ------------- without Skipping & binning (Not working)

                        ...

                            ret = SensorWriteAll_1B_Addr (SENSOR_ADDR_WR, MT9P031_ROW_START, 485); // 0x01

                            ret = SensorWriteAll_1B_Addr (SENSOR_ADDR_WR, MT9P031_COLUMN_START, 647); // 0x02

                            ret = SensorWriteAll_1B_Addr (SENSOR_ADDR_WR, MT9P031_WINDOW_HEIGHT, 971); // 0x03

                            ret = SensorWriteAll_1B_Addr (SENSOR_ADDR_WR, MT9P031_WINDOW_WIDTH, 1295); // 0x04

                         

                         

                            ret = SensorWriteAll_1B_Addr (SENSOR_ADDR_WR, MT9P031_HORIZONTAL_BLANK, 0x0000); // 0x05=0

                            ret = SensorWriteAll_1B_Addr (SENSOR_ADDR_WR, MT9P031_VERTICAL_BLANK, 0x0000); // 0x06=0

                         

                         

                            ret = SensorWriteAll_1B_Addr (SENSOR_ADDR_WR, MT9P031_SHUTTER_WIDTH_UPPER, 0x0000); // 0x09 INTEG_TIME_REG=1024

                            ret = SensorWriteAll_1B_Addr (SENSOR_ADDR_WR, MT9P031_SHUTTER_WIDTH_LOWER, 0x01AC); // 0x09 (1) INTEG_TIME_REG

                            ret = SensorWriteAll_1B_Addr (SENSOR_ADDR_WR, MT9P031_SHUTTER_DELAY, 0x0000); // 0x0C (1) SHUTTER_DELAY_REG

                            ret = SensorWriteAll_1B_Addr (SENSOR_ADDR_WR, MT9P031_ROW_ADDRESS_MODE, 0x0000); // 0x22 ROW_MODE, ROW_SKIP=0. ROW_BIN=0

                            ret = SensorWriteAll_1B_Addr (SENSOR_ADDR_WR, MT9P031_COLUMN_ADDRESS_MODE, 0x0000); // 0x23 COL_MODE, COL_SKIP=0. COL_BIN=0

                        ...

                         

                        ========= with skipping & binning (Working)

                        Top: FV

                        Bottom: LV

                        With_SkippingBinning.jpg

                         

                         

                        ============= without skipping & binning (Not working)

                        Without_SkippingBinning.jpg

                        • 9. Re: Is "2592x1944x1 byte in High speed(USB 2.0)" possible with FX3?
                          RashiV_61

                          Hello Don,

                           

                          Trace with binning and skipping: As per the settings you made, the fps is set to 5. But from the traces (with binning and skipping) the fps seems to be near to 20 fps (near to the frequency of FV i.e. 23 Hz) which means the sensor settings are not proper.

                          Please check the sensor settings.

                           

                          ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                          Trace without binning and skipping: From the trace, I cannot see the low and high time. Please send the snapshot which shows this clearly as in the previous trace or calculate the fps. This trace also shows that frequency of FV is doubled to 44 Hz which is contradicting to the setting you have done i.e. 5 fps.

                          Please calculate the FPS for this trace. As in previous case, if the fps is nearly equivalent to the frequency of FV (44 Hz), it would exceed the bandwidth of USB high speed hence can be a reason of error (not working).

                           

                          Regards,

                          Rashi

                          • 10. Re: Is "2592x1944x1 byte in High speed(USB 2.0)" possible with FX3?
                            DoLe_3354741

                            Hello Rashi,

                             

                            Thanks for your reply.

                             

                              Looks like OnSemi's MT9P031 doesn't have any frequency setting and the frequency difference between two pictures is from changing the MT9P031_SHUTTER_WIDTH_LOWER value.    I already changed the value(frequency) but the result was always the same(the setting with skipping&binning is OK and the other setting without skipping&binning is not working).

                             

                            Thanks,

                             

                            Don

                            • 11. Re: Is "2592x1944x1 byte in High speed(USB 2.0)" possible with FX3?
                              RashiV_61

                              Hello Don,

                               

                              You can tune the parameters to get the desired frames per second (refer attachment). I got this from datasheet of MT9P031 https://www.onsemi.com/pub/Collateral/MT9P031-D.PDF . The datasheet also says that the fps is programmable upto 14 for full resolution. So changing the fps seems possible.

                               

                              >> I already changed the value(frequency) but the result was always the same(the setting with skipping&binning is OK and the other setting without skipping&binning is not working).

                              According to my understanding on binning and skipping, if we enable the binning and skipping it would just reduce the resolution. So when you disable it i.e. the resolution remains same(no reduction) and if the fps settings are not proper as we saw in the traces you provided, it exceeds the bandwidth supported by USB high speed.

                               

                              For example: (from the trace without binning and skipping)

                              Bandwidth: 1296 X 972 X 1 X 44(fps)  = 55 MBps > 30/35 MBps (practically supported by USB high speed or works better)

                               

                              So in your case, if you don't want to use binning and skipping (i.e without resolution reduction) either you set the fps low enough to match the bandwidth requirement or you can go for lower resolutions.

                               

                              Regards,

                              Rashi

                              • 12. Re: Is "2592x1944x1 byte in High speed(USB 2.0)" possible with FX3?
                                DoLe_3354741

                                Hi Rashi,

                                 

                                According to MT9P031: Developer Guide (Rev. A-2013),   the fps can be tuned as follows.

                                 

                                Thanks,

                                 

                                Don

                                 

                                P.S.: Here, INTEG_TIME_REG = MT9P031_SHUTTER_WIDTH_LOWER.

                                         Maybe BLANK_REG is related to fps.

                                        For the following settings, the examples with skipping&binning only work in my USB 2.0 case.

                                 

                                =================================

                                Frame Rate and Resolution Register Settings

                                 

                                In order to run the MT9P031 in the following resolutions and frame rates, select the

                                matching presets in Devware or change the registers according to the following tables.

                                 

                                [1080P 30FPS INCREASED VERTICAL BLANKING]

                                //SETTINGS FOR 1080P WITH 30 FPS. ROLLING SHUTTER ARTIFACT REDUCED BY 12%.

                                LOAD = Reset

                                LOAD = 96MHz + Devware Bayer Offset

                                REG=0, 0x01, 431//ROW WINDOW START

                                REG=0, 0x02, 335// COL WINDOW START

                                REG=0, 0x03, 1079// ROW_WINDOW_SIZE_REG

                                REG=0, 0x04, 1919// COL_WINDOW_SIZE_REG

                                REG=0, 0x05, 0x0000// HORZ BLANK 0

                                REG=0, 0x06, 0x0091// VERT_BLANK_REG=145

                                REG=0, 0x08, 0x0000// SHUTTER_WIDTH_HI

                                REG=0, 0x09, 0x01AC// INTEG_TIME_REG

                                REG=0, 0x0C, 0x0000// SHUTTER_DELAY_REG

                                REG=0, 0x22, 0x0000// ROW_MODE

                                REG=0, 0x23, 0x0000// COL_MODE

                                LOAD = Rolling Artifact Optimization

                                 

                                 

                                [1080P 30FPS INCREASED FOV BY 12%]

                                //SETTINGS FOR 1080P WITH SHORTER ROW TIME BUT INCREASED FIELD OF VIEW.

                                ROLLING SHUTTER ARTIFACT REDUCED BY 6%

                                LOAD = Reset

                                LOAD = 96MHz + Devware Bayer Offset

                                REG=0, 0x01, 401//ROW WINDOW START

                                REG=0, 0x02, 281// COL WINDOW START

                                REG=0, 0x03, 1141// ROW_WINDOW_SIZE_REG

                                REG=0, 0x04, 2029// COL_WINDOW_SIZE_REG

                                REG=0, 0x05, 0x0000// HORZ BLANK 0

                                REG=0, 0x06, 0x0000// VERT BLANK 0

                                REG=0, 0x08, 0x0000// SHUTTER_WIDTH_HI

                                REG=0, 0x09, 0x01AC// INTEG_TIME_REG

                                REG=0, 0x0C, 0x0000// SHUTTER_DELAY_REG

                                REG=0, 0x22, 0x0000// ROW_MODE

                                REG=0, 0x23, 0x0000// COL_MODE

                                LOAD = Rolling Artifact Optimization

                                 

                                 

                                [1080P 34FPS]

                                //SETTINGS FOR 1080P WITH SHORTER ROW TIME AND FASTER FRAME RATE

                                //ROLLING SHUTTER ARTIFACT REDUCED BY 12%.

                                LOAD = Reset

                                LOAD = 96MHz + Devware Bayer Offset

                                REG=0, 0x01, 431//ROW WINDOW START

                                REG=0, 0x02, 335// COL WINDOW START

                                REG=0, 0x03, 1079// ROW_WINDOW_SIZE_REG

                                REG=0, 0x04, 1919// COL_WINDOW_SIZE_REG

                                REG=0, 0x05, 0x0000// HORZ BLANK 0

                                REG=0, 0x06, 0x0000// VERT BLANK 0

                                REG=0, 0x08, 0x0000// SHUTTER_WIDTH_HI

                                REG=0, 0x09, 0x01AC// INTEG_TIME_REG

                                REG=0, 0x0C, 0x0000// SHUTTER_DELAY_REG

                                REG=0, 0x22, 0x0000// ROW_MODE

                                REG=0, 0x23, 0x0000// COL_MODE

                                LOAD = Rolling Artifact Optimization

                                 

                                 

                                [1080P 30FPS]

                                //DEFAULT SETTINGS FOR 1080P

                                LOAD = Reset

                                LOAD = 96MHz + Devware Bayer Offset

                                REG=0, 0x01, 431//ROW WINDOW START

                                REG=0, 0x02, 335// COL WINDOW START

                                REG=0, 0x03, 1079// ROW_WINDOW_SIZE_REG

                                REG=0, 0x04, 1919// COL_WINDOW_SIZE_REG

                                REG=0, 0x05, 0x0000// HORZ BLANK 0

                                REG=0, 0x06, 0x0000// VERT BLANK 0

                                REG=0, 0x08, 0x0000// SHUTTER_WIDTH_HI

                                REG=0, 0x09, 0x01AC// INTEG_TIME_REG

                                REG=0, 0x0C, 0x0000// SHUTTER_DELAY_REG

                                REG=0, 0x22, 0x0000// ROW_MODE

                                REG=0, 0x23, 0x0000// COL_MODE

                                REG=0, 0x06, 0x0037// VERT_BLANK_REG has been adjusted to give precisely 30fps

                                REG=0, 0x05, 0x0000// HORZ_BLANK_REG

                                 

                                 

                                [720P 30FPS LONG VERTICAL BLANKING]

                                //RUNS AT HALF THE NORMAL SPEED BUT ROLLING ARTIFACT IS SAME AS DEFAULT 60FPS

                                LOAD = Reset

                                LOAD = 96MHz + Devware Bayer Offset

                                REG=0, 0x01, 0x0040// ROW_WINDOW_START_REG

                                REG=0, 0x02, 0x0018// COL_WINDOW_START_REG

                                REG=0, 0x03, 0x059F // ROW_WINDOW_SIZE_REG=1439

                                REG=0, 0x04, 0x09FF // COL_WINDOW_SIZE_REG=2559

                                REG=0, 0x05, 0x0000// HORZ BLANK 0

                                REG=0, 0x06, 0x02D0 // VERT_BLANK_REG=720

                                REG=0, 0x09, 0x0400 // INTEG_TIME_REG=1024

                                REG=0, 0x22, 0x0011 // ROW_MODE, ROW_SKIP=1. ROW_BIN=1

                                REG=0, 0x23, 0x0011 // COL_MODE, COL_SKIP=1, COL_BIN=1

                                REG=0, 0x20, 0x0060 // READ_MODE_2, COL_SUM

                                REG=0, 0x08, 0x0000//(1) SHUTTER_WIDTH_HI

                                REG=0, 0x09, 0x0296//(1) INTEG_TIME_REG

                                REG=0, 0x0C, 0x0000//(1) SHUTTER_DELAY_REG

                                LOAD = Subsample Optimization

                                 

                                 

                                [720P 30FPS]

                                //RUNS 30FPS 720P WITH LONGER INTEGRATION TIME AND SETTINGS WHICH ARE ALREADY BEST-CASE SCENARIO FOR ROLLING SHUTTER ARTIFACT

                                LOAD = Reset

                                LOAD = 96MHz + Devware Bayer Offset

                                REG=0, 0x01, 0x0040// ROW_WINDOW_START_REG

                                REG=0, 0x02, 0x0018// COL_WINDOW_START_REG

                                REG=0, 0x03, 0x059F // ROW_WINDOW_SIZE_REG=1439

                                REG=0, 0x04, 0x09FF // COL_WINDOW_SIZE_REG=2559

                                REG=0, 0x05, 0x0000// HORZ BLANK 0

                                REG=0, 0x06, 0x0000// VERT BLANK 0

                                REG=0, 0x09, 0x0400 // INTEG_TIME_REG=1024

                                REG=0, 0x22, 0x0011 // ROW_MODE, ROW_SKIP=1. ROW_BIN=1

                                REG=0, 0x23, 0x0011 // COL_MODE, COL_SKIP=1, COL_BIN=1

                                REG=0, 0x20, 0x0060 // READ_MODE_2, COL_SUM

                                REG=0, 0x08, 0x0000//(1) SHUTTER_WIDTH_HI

                                REG=0, 0x09, 0x05AF//(1) INTEG_TIME_REG

                                REG=0, 0x0C, 0x0000//(1) SHUTTER_DELAY_REG

                                LOAD = Subsample Optimization

                                 

                                 

                                [720P 60FPS]

                                //RUNS THE DEFAULT 60FPS 720P SETTINGS WHICH ARE ALREADY BEST-CASE SCENARIO FOR ROLLING SHUTTER ARTIFACT

                                LOAD = Reset

                                LOAD = 96MHz + Devware Bayer Offset

                                REG=0, 0x01, 0x0040// ROW_WINDOW_START_REG

                                REG=0, 0x02, 0x0018// COL_WINDOW_START_REG

                                REG=0, 0x03, 0x059F // ROW_WINDOW_SIZE_REG=1439

                                REG=0, 0x04, 0x09FF // COL_WINDOW_SIZE_REG=2559

                                REG=0, 0x05, 0x0000// HORZ BLANK 0

                                REG=0, 0x06, 0x0000// VERT BLANK 0

                                REG=0, 0x09, 0x0400 // INTEG_TIME_REG=1024

                                REG=0, 0x22, 0x0011 // ROW_MODE, ROW_SKIP=1. ROW_BIN=1

                                REG=0, 0x23, 0x0011 // COL_MODE, COL_SKIP=1, COL_BIN=1

                                REG=0, 0x20, 0x0060 // READ_MODE_2, COL_SUM

                                REG=0, 0x08, 0x0000//(1) SHUTTER_WIDTH_HI

                                REG=0, 0x09, 0x0296//(1) INTEG_TIME_REG

                                REG=0, 0x0C, 0x0000//(1) SHUTTER_DELAY_REG

                                LOAD = Subsample Optimization

                                 

                                 

                                [640x480 resolution,bin4x]

                                REG=0, 0x03, 0x0778//(10) ROW_WINDOW_SIZE_REG

                                REG=0, 0x04, 0x09F8//(7) COL_WINDOW_SIZE_REG

                                REG=0, 0x08, 0x0000//(6) SHUTTER_WIDTH_HI

                                REG=0, 0x09, 0x01AC//(6) INTEG_TIME_REG

                                REG=0, 0x0C, 0x0000//(6) SHUTTER_DELAY_REG

                                REG=0, 0x22, 0x0033//(2) ROW_MODE - SKip Bin registers (00->1xbin, 11->2xbin, 33->4xbin)

                                REG=0, 0x23, 0x0033//(3) COL_MODE - SKip Bin registers (00->1xbin, 11->2xbin, 33->4xbin)

                                REG=0, 0x08, 0x0000//(1) SHUTTER_WIDTH_HI

                                REG=0, 0x09, 0x0296//(1) INTEG_TIME_REG

                                REG=0, 0x0C, 0x0000//(1) SHUTTER_DELAY_REG

                                LOAD = Subsample Optimization

                                • 13. Re: Is "2592x1944x1 byte in High speed(USB 2.0)" possible with FX3?
                                  DoLe_3354741

                                  Hi Rashi,

                                   

                                  I tried another one.   I captured I2C settings from Imaging Source's DMM 72BUC02-ML module which includes MT9P031 and also supports Y8 with 2592x1944 resolution in USB 2.0. (4, 5, 7, 7.5 fps each).

                                   

                                  I used the captured register settings exactly in my module but the settings are not working.

                                   

                                  Do I have to re-consider DMA buffer size back ?

                                   

                                  Thanks,

                                   

                                  Don

                                  • 14. Re: Is "2592x1944x1 byte in High speed(USB 2.0)" possible with FX3?
                                    RashiV_61

                                    Hello Don,

                                     

                                    Are you getting the expected fps from the sensor after the settings are done? Can you prove FV and LV lines and confirm?

                                     

                                    Once we get expected FPS (which match the bandwidth limitation) , it should work with the buffer size (48KB ). If you are getting the expected fps what is the error you are facing?

                                     

                                    Regards,

                                    Rashi

                                    1 2 Previous Next