OV7740 on lychee


I have a question about camera on lychee. Indeed I would like to use ov7740 camera on lychee with openCV sample.

I can use vdc5 driver for camera ov7740 ?

Or I would like to use CEU driver but the lychee camera connector is wired with vdc5 pin.

Have you any idea to use ov7740 camera on lychee board 


Thanks for you reply,

  • The camera ov7740 works only with CEU driver.How I can define the pin DV0 (VDC5 pin ) into VIO to use CEU driver ?
  • In reply to Florian :

    Hi Florian,

    So far, I didn't notice someone using the CEU driver for GR-LYCHEE. However, there's a CEU sample program but it's for RZ/A1H MCU. You can find it here https://www.renesas.com/us/en/software/D3017419.html. Maybe it can help you.

    RenesasRulz Forum Moderator


  • In reply to Florian :

    The pin of CN12 is for VDC5. It can not be used in the CEU. Therefore, it is necessary to use VDC5.
    In OV7740, the order of pins may be reversed to CN12 of GR-LYCHEE. If you really need to use it, you must use the reverse flexible flat cable.

    If it meets the above, I think it will work with the following code. 

    Please copy ov7740_reset_regs_vga of "RZA1LU_SoftwarePackage\RZA1LU_BlinkySample\src\renesas\middleware\cmos\src.r_camera_ov7740.c" to OV7740_InitRegTable.
    RZA1LU_SoftwarePackage : https://www.renesas.com/in/en/products/software-tools/software-os-middleware-driver/software-package/rza1-software-development-kit-free-rtos.html#productInfo

    #ifndef OV7740_CONFIG_H
    #define OV7740_CONFIG_H
    #include "mbed.h"
    #include "camera_config.h"
    class OV7740_config : public camera_config {
        /** Initialise
         * @return true = success, false = failure
        virtual bool Initialise() {
            /* OV7740 camera input config */
            const char OV7740_InitRegTable[][2] = {
    // #### copy ov7740_reset_regs_vga of "RZA1LU_SoftwarePackage\RZA1LU_BlinkySample\src\renesas\middleware\cmos\src.r_camera_ov7740.c" ####
            int ret;
            I2C mI2c_(I2C_SDA, I2C_SCL);
            for (uint32_t i = 0; i < (sizeof(OV7740_InitRegTable) / 2) ; i++) {
                ret = mI2c_.write(0x42, OV7740_InitRegTable[i], 2);
                if (ret != 0) {
                    return false;
            return true;
        virtual void SetExtInConfig(DisplayBase::video_ext_in_config_t * p_cfg) {
            p_cfg->inp_format     = DisplayBase::VIDEO_EXTIN_FORMAT_BT601; /* BT601 8bit YCbCr format */
            p_cfg->inp_pxd_edge   = DisplayBase::EDGE_RISING;              /* Clock edge select for capturing data          */
            p_cfg->inp_vs_edge    = DisplayBase::EDGE_RISING;              /* Clock edge select for capturing Vsync signals */
            p_cfg->inp_hs_edge    = DisplayBase::EDGE_RISING;              /* Clock edge select for capturing Hsync signals */
            p_cfg->inp_endian_on  = DisplayBase::OFF;                      /* External input bit endian change on/off       */
            p_cfg->inp_swap_on    = DisplayBase::OFF;                      /* External input B/R signal swap on/off         */
            p_cfg->inp_vs_inv     = DisplayBase::SIG_POL_NOT_INVERTED;     /* External input DV_VSYNC inversion control     */
            p_cfg->inp_hs_inv     = DisplayBase::SIG_POL_INVERTED;         /* External input DV_HSYNC inversion control     */
            p_cfg->inp_f525_625   = DisplayBase::EXTIN_LINE_525;           /* Number of lines for BT.656 external input */
            p_cfg->inp_h_pos      = DisplayBase::EXTIN_H_POS_YCBYCR;       /* Y/Cb/Y/Cr data string start timing to Hsync reference */
            p_cfg->cap_vs_pos     = 5;                                     /* Capture start position from Vsync */
            p_cfg->cap_hs_pos     = 144;                                   /* Capture start position form Hsync */
            p_cfg->cap_width      = 640;                                   /* Capture width Max */
            p_cfg->cap_height     = 480;                                   /* Capture height Max */
  • In reply to dkato:

    Thanks a lot, It's works when I reversed the flexible cable. But There is more flickering with ov7740 than ov7725.
  • In reply to Florian :

    I thinks that the flickering is due to my Flex. Indee my flex is too long ( 25 cm) .