Search

Technical Discussion Group Forum

This forum is provided for user discussion. While Logic PD support staff and engineers participate, Logic PD does not guarantee the accuracy of all information within in the Technical Discussion Group (TDG).

The "Articles" forums provide brief Articles written by Logic PD engineers that address the most frequently asked technical questions.

To receive email notifications when updates are posted for a Logic PD product download, please subscribe to the TDG Forum of interest.

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 29 Mar 2019 07:05 AM by  Swathi CA
OVM7692 camera interface with DM3730 Torpedo Kit
 23 Replies
Sort:
You are not authorized to post a reply.
Page 1 of 212 > >>
Author Messages

Swathi CA



New Member


Posts:16
New Member


--
13 Nov 2018 06:28 AM

    Hi,

    We want to connect a OVM7692 camera to a DM3730 Torpedo + Wireless kit. I need few clarifications:

    1) Can we connect the OVM7692 camera to the DM3730 Torpedo + Wireless kit OR do we need to use a OVM7692 camera development board?

    1) OVM7692 powers supply is a 2.8V but the  DM3730 Torpedo + Wireless kit uses 1.8V Do we need a adapter board to connect the OVM7692 camera with the  DM3730 Torpedo + Wireless kit?

    3) Is there LInux BSP driver code changes required for this combination?

    Any help will be appreciated.

    Thanks,

    Swathi


    Adam Ford



    Advanced Member


    Posts:772
    Advanced Member


    --
    13 Nov 2018 07:40 AM
    The Torpedo itself supports 8-bit parallel CSI interface for the camera interface and it's operational at 1.8V. While The baseboard was designed to work with a Leopard Imaging LI-5M04, we have had customers use other cameras with success. The signals themselves are industry standard CSI, but so some sort of adapter board may be required to electrically connect different camera modules to make the pin-out match what the baseboard is expecting. The base board also level shifters to change from 1.8V to the operating voltage of the camera, and the schematic of the baseboard has a table of resistor values to change the CAM_VIO to a variety of voltage levels if necessary. This would technically void the warranty of the baseboard, but it's there to provide some flexibility for customers who need some different values.

    The most difficult part would be the camera driver itself. I scanned through the Linux source code at Kernel.org, but I didn't find any source code for the OVM7692 sensor. You might contact the manufacturer to see if they have a driver. If they do, we have a services group that could help integrate the driver into one of our BSP's under a contract. Let us know if you'd like me to have someone reach out to you.

    Thank you,

    adam


    Swathi CA



    New Member


    Posts:16
    New Member


    --
    15 Nov 2018 01:21 AM
    Thanks for the response.
    I have read that "A driver does exist for the OV7690 in the DM37x Linux 2.4-2 BSP using Linux 3.0." from the documents shared for DM3730 on support.logicpd.com website.
    Could you please let us know if the linux driver for OV7690 is supported in Linux BSP 4.03. If so, where can I find the Linux BSP to download?

    Thanks,
    Swathi

    Adam Ford



    Advanced Member


    Posts:772
    Advanced Member


    --
    19 Nov 2018 08:35 AM
    We don't have a BSP 4.03. We have a 2.4-2, 2.4-3 and 2.4-4 BSP all based on a 3.0.x kernel, and we have BSP's based on 4.4 Kernel and 4.9 Kernel.

    I reviewed the Linux User Guide for our 2.4-4 BSP which is an evolution of the 2.4-2 BSP, and the OV7690 driver is present there, unfortunately I don't have the hardware to test this code, so I cannot verify the functionality.

    However, I was able to locate the the board file which initializes the camera, and it is located: arch/arm/mach-omap2/board-omap3logic.c If you need to modify the settings for the camera, you should be able to start there.

    In order to download the BSP's, you'll need to make sure you've registered a SOM and or development kit on our support site. Our contracts person will do denied party screening, and then he grants permissions.

    Our torpedo page is located:
    http://support.logicpd.com/ProductD...doSOM.aspx

    Our recommendation for building these Kernels is to use a Virtual Box VM which is located here: http://support.logicpd.com/DesktopM...ntryId=858

    This VM is has the dependencies already setup and the build environment should be ready to go.

    The corresponding User Guide is located: http://support.logicpd.com/DesktopM...tryId=1392

    adam

    Swathi CA



    New Member


    Posts:16
    New Member


    --
    03 Dec 2018 11:50 PM

    Thanks Adam.
    We have purchased Davinci DM3730 Logic PD Zoom kit. After setting up the board as per the manual. I observed that the:
    1) DM3730 Torpedo + Wireless SOM is not booting up (No UART logs and LCD display). And also the chip is heating up. Is there anything I can do to confirm the behavior. Do I need to raise a request for replacement?
    2) DM3730 Torpedo SOM is booting up and UART logs are seen. But it is not taking the IPAddress. The following error is seen:

    "Setting up networking on loopback device:
    Setting up networking on eth0:
    udhcpc: SIOCGIFINDEX: No such device
    "

     

    Note:  I have started the product registration process.

     

    Thanks,
    Swathi


    Adam Ford



    Advanced Member


    Posts:772
    Advanced Member


    --
    04 Dec 2018 08:08 AM
    Is sounds like you'll need an RMA for the Torpedo + Wireless that doesn't start.

    Can you post the boot logs on the device that isn't getting an IP address? I'd like to see if the driver is loading.

    Can you also check to the contents of /etc/network/interfaces

    There should be an entry in there for eth0. If not, it won't get an IP address. If you're using the 4.9 Kernel that we publish, look in section 4.4.1.4 about editing this file.

    adam

    Adam Ford



    Advanced Member


    Posts:772
    Advanced Member


    --
    04 Dec 2018 08:09 AM

    I should note the RMA for the Torpedo + Wireless should route through the distributor where you purchased the SOM.

    adam


    Swathi CA



    New Member


    Posts:16
    New Member


    --
    18 Jan 2019 05:20 AM
    Hi Adam,

    We have connected OV7670 devkit ( to DM3730 Torpedo+Wireless SOM via camera connector port(J6). To enable OV7670 driver in the build, made changes in omap3logic_defconfig.dev, board-omap3logic.c On bootup, we see a probe error.
    ov7670 3-0021: OV7670_write_i2c, address 0x21
    chip found @ 0x42 (OMAP I2C adapter) is not an ov7670 chip.
    ov7670: probe of 3-0021 failed with error -121
    isp_register_subdev_group: Unable to register subdev ov7670
    Are we missing anything for the i2c device to be detected successfully.
    We are using BSP 2.4.4. where to get the LogicPD latest kernel version?
    Currently we do not have any adapter board to connect the camera to the SOM. Hence we power up the OV7670 with external power supply and the SCL,SDA,XCLK,PCLK,VS,HS,D0-D7 are connected to SOM. I hope this setup should not cause any issues.

    Thanks,
    Swathi

    Adam Ford



    Advanced Member


    Posts:772
    Advanced Member


    --
    21 Jan 2019 02:21 PM
    We have a beta Linux BSP for the Torpedo and Torpedo + Wireless. The User Guide is listed here: http://support.logicpd.com/DesktopM...tryId=3053">http://support.logicpd.com/DesktopM...tryId=3053

    It's considered beta because some of the drivers for the baseboard are not availabile in the mainline kernel, and some features, like the 3D accelerator and DSP are not being supported by the silicon vendor, so when compared to the feature list of our older kernel, the new ones have less functionality.

    Having said that, the user guide is located here: http://support.logicpd.com/DesktopM...tryId=3053">http://support.logicpd.com/DesktopM...tryId=3053

    We've had mainline support for the Torpedo for a while, so if you want to try the latest version from Kernel.org, you're welcome to try it. The advantage of the 4.4+ kernels is the device tree, and the ability to add features to the board by setting up the device tree instead of modifying custom C code to enable the drivers. Unlike desktop x86/64 computers, making a new driver operate isn't just the step of enabling it in the menuconfig. The device trees in modern kernels tell the software what hardware is available, and the legacy board files (described below) do it on older kernels which pre-date the device trees.

    If you're going to use the 2.4-4 BSP, you'll want to review the custom board file. On our virtual machine, it's located: ~/logic/Logic_BSPs/Linux_3.0/1027480_LogicPD_Linux_BSP_2.4-4/rpm/BUILD/linux/arch/arm/mach-omap2/board-omap3logic.c

    Inside here, there are some structures setup for the camera. There is support for both the mt9p031 and the
    OV7690. You should be able to use them as a model, assuming the kernel has a driver available.

    We have a design and engineering services group who can quote this type of work if you need custom development done to modify the kernel to work on your hardware. Please let me know if you'd like one of our sales people to contact you.

    adam

    Swathi CA



    New Member


    Posts:16
    New Member


    --
    15 Feb 2019 07:02 AM
    Hi Adam,
    We have the Ov7670 connected to the Dm3730 Torpedo kit. We went through the mt9p031.c driver file. We are trying to understand how the data pins D0-D7 of the DM3730 Torpedo chip is being mapped to read the image from in the driver code. Kindly need more information on how the mapping is done.

    Thanks,
    Swathi

    Adam Ford



    Advanced Member


    Posts:772
    Advanced Member


    --
    15 Feb 2019 09:21 AM

    If you're going to use the 2.4-4 BSP, you'll want to review the custom board file. On our virtual machine, it's located: ~/logic/Logic_BSPs/Linux_3.0/1027480_LogicPD_Linux_BSP_2.4-4/rpm/BUILD/linux/arch/arm/mach-omap2/board-omap3logic.c

    Inside here, there are some structures setup for the camera. Specifically, the

    isp_v4l2_subdevs_group omap3logic_camera_subdevs[] = {
         .interface = ISP_INTERFACE_PARALLEL,
         .bus = {
              .parallel = {
              .data_lane_shift = ISPCTRL_SHIFT_0 >> ISPCTRL_SHIFT_SHIFT, //3.3+ISP_LANE_SHIFT_0,
              .clk_pol = 0,
              .hs_pol = 0, // HSYNC not inverted
              .vs_pol = 0, // VSYNC not inverted
              .bridge = ISPCTRL_PAR_BRIDGE_LENDIAN>> ISPCTRL_PAR_BRIDGE_SHIFT //3.3+ISP_BRIDGE_LITTLE_ENDIAN,
    //3.3+ .bt656 = 0,
               },
    },
     

    The .interface references the ISP_INTERFACE_PARALLEL

    The bus references parallel, and the various pol entries determine whether or not they are inverted or not (ie active low/high)

     

    There is also the pin-muxing entires that tell the system how to configure the various GPIO pins and route them to the ISP camera interface.

     

    static void dm3730logic_camera_init(void)
    {
            omap_mux_init_signal("cam_hs.cam_hs",OMAP_PIN_INPUT);
            omap_mux_init_signal("cam_vs.cam_vs",OMAP_PIN_INPUT);
            omap_mux_init_signal("cam_xclka.cam_xclka", OMAP_PIN_INPUT);
    //        omap_mux_init_signal("cam_xclkb.cam_xclkb", OMAP_PIN_INPUT);
            omap_mux_init_signal("cam_pclk.cam_pclk", OMAP_PIN_INPUT);

            omap_mux_init_signal("cam_d0.cam_d0", OMAP_PIN_INPUT);
            omap_mux_init_signal("cam_d1.cam_d1", OMAP_PIN_INPUT);
            omap_mux_init_signal("cam_d2.cam_d2", OMAP_PIN_INPUT);
            omap_mux_init_signal("cam_d3.cam_d3", OMAP_PIN_INPUT);
            omap_mux_init_signal("cam_d4.cam_d4", OMAP_PIN_INPUT);
            omap_mux_init_signal("cam_d5.cam_d5", OMAP_PIN_INPUT);
            omap_mux_init_signal("cam_d6.cam_d6", OMAP_PIN_INPUT);
            omap_mux_init_signal("cam_d7.cam_d7", OMAP_PIN_INPUT);
    }


    Swathi CA



    New Member


    Posts:16
    New Member


    --
    20 Feb 2019 09:20 AM
    Thanks Adam.
    Can you point to the code where the data is been read from the datalines (D0-D7)of the camera(J6 connector).

    I also need some clarification on how the v4l2_subdevice is linked with v4l2_device. Looking at the BSP document and the driver code for mt9031, the mt9p031 implements only a v4l2_subdev driver. On successful probe, the mt9031 driver will create a device file /dev/v4l2_subdev8. But the gstreamer(gst-launch) commands mentioned in the BSP document specifies the device as /dev/video6. I could not get the link of how the /dev/v4l2_subdev8 is linked to /dev/video6 on Torpedo.

    It would be helpful if you can share the logs(dmesg) of mt9p031 camera. Since mt9p031 camera devkit is not available in market, we are unable to observer the behavior with Torpedo kit .

    Thanks,
    Swathi

    Adam Ford



    Advanced Member


    Posts:772
    Advanced Member


    --
    22 Feb 2019 07:46 AM
    I'm going to privately e-mail you a log and some draft updates to the user guide which may help explain how to do the pipeline routing.

    If you're doing a new design, you may want to consider the 4.9 kernel we published instead of the 3.0 kernel, however if you need the DSP, stay with the 3.0 kernel as TI dropped DSP support somewhere in the mid-3.x kernels.

    The 4.9 User guide explains a bit more on how to identify the video pipeline and how to associate the camera to the video capture port.

    adam

    Adam Ford



    Advanced Member


    Posts:772
    Advanced Member


    --
    22 Feb 2019 07:58 AM

    From the kit, you can run
    # media-ctl --print-dot

    That will dump a bunch of text. If you then copy that text to your host machine and create a text file called pipeline.dot, you can convert the output of that to a graphic which will show the pipeline options.

    dot -T png -o pipeline.png pipeline.dot


    Swathi CA



    New Member


    Posts:16
    New Member


    --
    25 Feb 2019 07:11 AM
    Thank you for all the information Adam. We had followed the same path. We could generate the flow chart for ov7692 driver with the media-ctl commands. It is similar to the one you have shared. I will try to get the image from the camera.

    Thanks,
    Swathi

    Swathi CA



    New Member


    Posts:16
    New Member


    --
    26 Feb 2019 08:21 AM
    Hi Adam,
    To get an image from the parallel camera , we followed the steps in the BSP document. The gst-launch command is throwing a "Error start streaming". We are stuck with this error. Why would this error occur? Any inputs would help in debugging the issue.

    0:00:01.695037943 787 0x1d000 INFO v4l2src gstv4l2src.c:587:gst_v4l2src_get_caps: (null)
    0:00:01.713531596 787 0x1d000 INFO v4l2src v4l2src_calls.c:306:gst_v4l2src_capture_init: capturing buffers via mmap()
    0:00:01.767852885 787 0x1d000 WARN v4l2 gstv4l2object.c:1952:gst_v4l2_object_start_streaming: error: Error starting streaming on device '/dev/video6'.
    0:00:01.787017924 787 0x1d000 WARN v4l2 gstv4l2object.c:1952:gst_v4l2_object_start_streaming: error: system error: Invalid argument
    0:00:01.804657084 787 0x1d000 INFO GST_ERROR_SYSTEM gstelement.c:1763:gst_element_message_full: posting message: Error starting streaming on device '/dev/video6'.
    0:00:01.824676615 787 0x1d000 INFO GST_ERROR_SYSTEM gstelement.c:1786:gst_element_message_full: posted error message: Error starting streaming on device '/dev/video6'.
    0:00:01.845092875 787 0x1d000 INFO GST_EVENT gstevent.c:597:gst_event_new_new_segment_full: creating newsegment update 0, rate 1.000000, format GST_FORMAT_TIME, start 0:00:00.000000000, stop 99:99:99.999999999, position 0:00:00.000000000
    0:00:01.871551615 787 0x1d000 INFO GST_STATES gstelement.c:2238:gst_element_continue_state: completed state change to PAUSED
    0:00:01.892608744 787 0x1d000 INFO GST_STATES gstelement.c:2251:gst_element_continue_state: posting state-changed READY to PAUSED
    0:00:01.909973246 787 0x1d000 INFO GST_STATES gstbin.c:2464:gst_bin_change_state_func: child 'v4l2src0' changed state to 3(PAUSED) successfully without preroll
    0:00:01.930053813 787 0x1d000 INFO GST_STATES gstelement.c:2238:gst_element_continue_state: completed state change to PAUSED
    0:00:01.947021586 787 0x1d000 INFO GST_STATES gstelement.c:2251:gst_element_continue_state: posting state-changed READY to PAUSED
    Pipeline is live and does not need PREROLL ...
    ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Error starting streaming on device '/dev/video6'.
    Additional debug info:
    gstv4l2object.c(1952): gst_v4l2_object_start_streaming (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
    system error: Invalid argument
    ERROR: pipeline doesn't want to preroll.
    Setting pipeline to PAUSED ...

    Thanks,
    Swathi

    Swathi CA



    New Member


    Posts:16
    New Member


    --
    27 Feb 2019 06:36 AM
    Hi Adam,
    We were able to stream the video from OV7670 to LCD. The issue was the s_stream under video_ops ans s_ctrl under ctrl_ops were missing.

    Thanks,
    Swathi

    Adam Ford



    Advanced Member


    Posts:772
    Advanced Member


    --
    27 Feb 2019 06:53 AM
    That's excellent news. I was going to suggest turning on some of the debugging options, but it looks like you got it.

    adam

    Swathi CA



    New Member


    Posts:16
    New Member


    --
    04 Mar 2019 06:32 AM
    Adam,
    After the gstreamer is run to capture the image from the parallel camera and stop the capture by terminating (control-C) gstreamer. We are not able to perform i2cget/i2cset on the i2c OV7670 camera device successfully. The Read Failed and Write Failed error is seen. This may be due to the bus being busy or still occupied.
    We can perform i2c commands before running gstreamer command.

    Thanks,
    Swathi

    Adam Ford



    Advanced Member


    Posts:772
    Advanced Member


    --
    05 Mar 2019 07:16 AM
    I found some info on g-streamer where they suggest setting the number of frames to capture.

    http://gstreamer-devel.966125.n4.na...74202.html

    set "num-buffers" property in v4lsrc .

    You are not authorized to post a reply.
    Page 1 of 212 > >>