CYUSB3014 and MT9V034 programming problems

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

cross mob
lock attach
Attachments are accessible only for community members.
QiLi_4789831
Level 1
Level 1
10 replies posted 10 sign-ins 5 replies posted

Hi

    There is a CYUSB3014 & MT9V034 camera programming, follow the application AN75779 instructions: according to Aptina MT9V034 data sheet changed sensor.c. Update the length of the high-speed and super-speed USB configuration descriptor and the length of the video stream input header descriptor. At the same time, through the GPIF II Designer, modify the "data bus width" field to select "16 bits", recompile the GPIF project, and use the newly generated file "cyfxgpif2config.h" Replace the original file. After all the files are modified, compile the CYUSB3014 project, use the IMG file in the DEBUG directory to write CYUSB3014. insert the host, the host USB can enumerate the camera correctly. It seems to be correct to capture the USB data between the camera and the host.  See attachment USB.TXT.

     But when I open the camera with the host application, I cannot capture the image of the camera. To capture the USB data between the camera and the host, the host is always in the "SET INTERFACE" command loop. For the captured data, see Annex 9V034.TXT.

The search data "SET INTERFACE" is a command of USB2.0, but the returned data does not know what it means. In this case, where should I look in the firmware to find the problem?

     Any help you can provide would be greatly appreciated!

   Qimin Liu

0 Likes
1 Solution

Hi Qimin Liu,

Glad to hear that the streaming worked after sensor configurations were changed.

But out of the image background is pink. Is there anything else that should be modified?

>> Please let me know the video color format, bits per pixel, and the GPIF bus width.

There can be two reasons for this

1) If the bits per pixel (sensor output bus width) don't match the GPIF bus width then nonimage data (zeros) will be padded to the video data.

For example, if the video is in RAW 10 format (i.e. 10 bits per pixel and sensor outputs 10 bits data) and  GPIF bus width is 16 bits then 6 bits non-image data (zeros) is padded to the video data. UVC specification does not support the RAW format. If the GUID in the descriptors are not changed, the AN75779 firmware will stream RAW video as  YUY2 video. Any generic UVC host application can be used to view the video but the video can be expected to be pinkish/greenish.

2) If the GPIF - sensor interface is not proper (noise), then zeros/ones will be sampled on the GPIF bus which can cause the pinkish/greenish video stream.

Regards,

Rashi

Regards,
Rashi

View solution in original post

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

Hello,

Please confirm if the device is connected s a USB 3.0 device or USB 2.0 device

Please enable the DEBUG_PRINT_FRAME_COUNT macro in the firmware and share the UART debug prints when the FX3 is programmed with the firmware.

Also, let me know the video resolution, FPS, GPIF bus width, video format which you are trying to stream

If possible, please share the firmware files for us to check. You can remove the sensor configuration part.

Regards,

Rashi

Regards,
Rashi
0 Likes
lock attach
Attachments are accessible only for community members.

Hi  Rashi

This is Sensor parameters:

According to the application AN75779, the configuration changes I made are as follows:

GPIF:

FOR HS USB:

FOR SS USB :

PROB FOR USB2 :

PROB FOR USB3 :

  The HOST Port is USB3.0.

Because it is a simple CYUSB3014 control board, there is no serial port, so the information can only be obtained through the USB port.

See the attachment for the modified configuration file. Please help to check if there is a problem with the configuration.

Best Regards!

Qimin

0 Likes

Hello Qimin,

The changes in the firmware seems fine.

Please let me know the host PC configuration with which the streaming is tested.

From the traces shared earlier I found that the PC is Windows Vista (Bus Hound 6.01 capture on Windows Vista (x64). Complements of www.perisoft.net). Please confirm.

If yes, UVC spec 1.1 is not supported by by Windows Vista USB Video Class Driver Overview - Windows drivers | Microsoft Docs so,please let me know if the macro FX3_UVC_1_0_SUPPORT is enabled in uvc.h file.

Regards,

Rashi

Regards,
Rashi
0 Likes

Hi  Rashi,

  I'm sorry that this project was suspended because of other things.

  The information about the system I use is as follows:

  Before Bus Hound recognized the system as Vista (x64), it may be because its version is too old.

Best regards!

  Qimin

  

0 Likes

Why can't I see the attached picture?

system message:

win10 1909 workstation

0 Likes
lock attach
Attachments are accessible only for community members.

Hello Qimin,

Please let me know the steps you follow for streaming the video.

As the UART port is not available on your board, I have modified the AN7577 firmware to add a CDC interface so that the Debug prints can be seen on the serial port.

Please make a similar change to your firmware or use the attached firmware and share the UART debug prints so that we can confirm of the Producer events are received from the below shown debug print. Please enable DEBUG_PRINT_FRAME_COUNT macro

CyU3PDebugPrint (4, "UVC: Completed %d frames and %d buffers\r\n", glFrameCount,

                (glDmaDone != 0) ? (glDmaDone - 1) : 0);

Please let me know if you are able to get the debug prints with this firmware

Regards,

Rashi

Regards,
Rashi
0 Likes

Hi Rashi

   Thanks for your reply.

    The problem seems to be in SENSOR.C. After modifying this file, the image can now be output. it uses a monochrome sensor. But out of the image background is pink.

    Is there anything else that should be modified?

  Best Regards!

  Qimin Liu

0 Likes

Hi Qimin Liu,

Glad to hear that the streaming worked after sensor configurations were changed.

But out of the image background is pink. Is there anything else that should be modified?

>> Please let me know the video color format, bits per pixel, and the GPIF bus width.

There can be two reasons for this

1) If the bits per pixel (sensor output bus width) don't match the GPIF bus width then nonimage data (zeros) will be padded to the video data.

For example, if the video is in RAW 10 format (i.e. 10 bits per pixel and sensor outputs 10 bits data) and  GPIF bus width is 16 bits then 6 bits non-image data (zeros) is padded to the video data. UVC specification does not support the RAW format. If the GUID in the descriptors are not changed, the AN75779 firmware will stream RAW video as  YUY2 video. Any generic UVC host application can be used to view the video but the video can be expected to be pinkish/greenish.

2) If the GPIF - sensor interface is not proper (noise), then zeros/ones will be sampled on the GPIF bus which can cause the pinkish/greenish video stream.

Regards,

Rashi

Regards,
Rashi
0 Likes

Hi  Rashi

     Read the manual of the sensor, its output image format is "Monochrome bayer" [RAW?]. The signal output is 10-bit parallel .

     The GPIF bus width I set in FX3 is 16 bits, of which 10 bits are connected to the sensor, and the remaining 6 bits are pulled down.

          CyU3PGpioSetIoMode(10,CY_U3P_GPIO_IO_MODE_WPD);  /*GPIO weak pull-down */

          CyU3PGpioSetIoMode(11,CY_U3P_GPIO_IO_MODE_WPD);  /*GPIO weak pull-down */

          CyU3PGpioSetIoMode(12,CY_U3P_GPIO_IO_MODE_WPD);  /*GPIO weak pull-down */

          CyU3PGpioSetIoMode(13,CY_U3P_GPIO_IO_MODE_WPD);  /*GPIO weak pull-down */

          CyU3PGpioSetIoMode(14,CY_U3P_GPIO_IO_MODE_WPD);  /*GPIO weak pull-down */

          CyU3PGpioSetIoMode(15,CY_U3P_GPIO_IO_MODE_WPD);  /*GPIO weak pull-down */

  Best Regards!

  Qimin Liu

0 Likes

Hi,

Thank you for the details.

As the 6 unused pins are pulled down, for every pixel ( i.e. 10 bits) 6 bits (non-image data i.e. zeroes) will be sampled. As RAW 10 is being streamed as YUV format the U and V components will be sampled 0 due to which the pinkish color is seen.

Regards,

Rashi

Regards,
Rashi
0 Likes

Hi Rashi

   It is indeed a problem caused by the setting of the GPIF bus. Setting the highest bit of the GPIF bus to a high level can output normal grayscale images.

   CyU3PGpioSetIoMode(15,CY_U3P_GPIO_IO_MODE_WPU);  /*GPIO weak pull-up */

   But does this setting affect normal use?

   Best Regards!

   Qimin Liu

0 Likes

Hello,

But does this setting affect normal use?

>> As there is a mismatch in the sensor output bus width and the GPIF interface bus width, the 6 pins can either be pulled up or pull down as per the application. There won't be any effect as these non-image bits are expected to be removed on the host side to get the proper video

Regards,

Rashi

Regards,
Rashi