This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Problem with preview on-the-fly on DM6437

Other Parts Discussed in Thread: PCA9543A, PCF8574A

Here's my installation:

WIN XP

CCS version 3.3.38.2

BIOS 5.31.02

 

I try to use the code from "dvsdk_1_01_00_15\psp_1_00_02_00\pspdrivers\system\dm6437\bios\dm6437_evm\src\video\sample\previewer_on_the_fly+

which get the raw data from CMOS sensor >> CCDC>> Preview engine >> VPBE >> display

But after I run the project , it dosen't work.....

 Before I use this code ,I tried to use the "rawcapture"

"dvsdk_1_01_00_15\psp_1_00_02_00\pspdrivers\system\dm6437\bios\dm6437_evm\src\video\sample\rawcapture"

Though the images display on the LCD are not good enough ,It works .

However , now I can't see any display on the LCD when Iuse the "preview on-the-fly"

 

Could anyone tell me what the problem is ? plz ...

 

  • Hi,

    I'm not sure if you question applies to Linux. I'm going to move this thread to the BIOS forum instead. Maybe other experts would be able to help you.

  • Hi,

    While building the previewer on-the-fly application, you need to enable the macro "PSP_VIDEO_PATH_ENABLE". The details are available in the section 4.3 of the document "\psp_1_00_02_00\pspdrivers\drivers\previewer\docs\BIOS_PREVIEWER_Driver_UserGuide.pdf".

    Please follow the instructions in the doc and let me know the result.

    Thanks and regards,

    Sandeep K

  • THANK YOU ~

    I've enabled "PSP_VIDEO_PATH_ENABLE" in psp_vpfe.h .But it stii doesn't work........

    however ,the code goes error at the FVID_exchange .........

  • Hi Ellen  wang,

    Apologies for the delayed response.

    Once after defining the "PSP_VIDEO_PATH_ENABLE" macro in the psp_vpfe.h file, you need to build both the driver module and then the application. This is required since the driver library also uses the same macro by adding the psp_vpfe.h file in the source file.

    Hope this would resolve the issue.

    BTW, have you modified anything in the driver or the sample application?

    Thanks and Regards,

    Sandeep K  

  • Thank you very much .

    I haven't modify anything in the driver or sample application.

    Could you tell me where I should modify ,for I don't really know the driver clearly.......

    Sorry for my lack of knowledge.......

     

  • Ellen wang,

    Do not modify anything in the driver or the application.

    Take the PSP as it is, modify the file "\psp_1_00_02_00\pspdrivers\inc\psp_vpfe.h"  to have the line,

    #define PSP_VIDEO_PATH_ENABLE     [ -- By default this line would be commentted].

    Then rebuild the driver as well as the apllication.

    Thanks and Regards,

    Sandeep K

  • Well...........I have done this before.....it didn't work....

    What I do to this program is configuring the i2c for my sensor mt9p001, and nothing else......

    However , the program gets error at  FVID_exchange . but all the channels(CCDC,VEDIO,VENC...etc) are all created successfully .

    Confuse................


     

  • What error is thrown by FVID_exchange()?

    If you check the function "VPFE_mdSubmitChan()]" in the file "\psp_1_00_02_00\pspdrivers\drivers\vpfe\src\dda_vpfeIom.c", the FVID_exchange can fail because of PSP_VPFESubmitRequest(...,FVID_QUEUE ....) OR PSP_VPFESubmitRequest(..., FVID_DEQUEUE  ....).

    Which one of the above is causing the problem?

    If you step through these functions you might get a hint for failure.

    Thanks and Regards,

    Sandeep K

  • It seems the DEQUEUE error .

    I hope this check will be right !

    I set the breakpoint at the red line ,and the program runs into the DEQUEUE one.

    It doesn't run into the QUEUE one.

     

    if(FVID_EXCHANGE == packet->cmd)
                        {
                            statusSBMT = PSP_VPFESubmitRequest(chanSBMT->ddc_Handle,
                                                               FVID_QUEUE,
                                                               (Ptr)(*(Uint32 *)(packet->addr)));
                            /*Check the status if succes */
                            if(PSP_SOK != statusSBMT)
                            {
                                /* IOM error code equivalent to PSP error code */
                                statusSBMT = getIomErrorCode(statusSBMT);
                            }

    if(PSP_SOK == statusSBMT)
                            {
                                statusSBMT = PSP_VPFESubmitRequest(chanSBMT->ddc_Handle,
                                                                   FVID_DEQUEUE,
                                                                   packet->addr);
                                /*Check the status if succes */
                                if(PSP_SOK != statusSBMT)
                                {
                                    /* IOM error code equivalent to PSP error code */
                                    statusSBMT = getIomErrorCode(statusSBMT);
                                }
                            }

  • Ellen wang,

    In the function "( PSP_VPFESubmitRequest( ....., FVID_DEQUEUE,....)  => DDC_VPFEDeQueueFrameBuffer =>) DDC_VPFEDelQueue() " of the file "\psp_1_00_02_00\pspdrivers\drivers\vpfe\src\ddc_vpfe.c", please verify which function is getting failed.

    In the mean time, please put the breakpoint in the ISR "DDC_VPFEIsr" in the file "\psp_1_00_02_00\pspdrivers\drivers\vpfe\src\ddc_vpfe.c", to see there are any interrupt being generated after FVID_QUEUE.

    In the interrupt context the "handleDQ->dequeueSem" semaphore will be released, if not then FVID_DEQUEUE will wait for "timeout = 2000" and then might declare as failure (refer DDC_VPFEDelQueue()  function for waiting for semaphore logic).

    Let me know the result.

    Thanks and Regards,

    Sandeep K

     

  • Thanks for your patience.....I really appreciate .....

    The program would run into the statement here in the function " DDC_VPFEDelQueue " :

    if(NULL == fbDQ->freeQueue[fbDQ->readIndexFreeQue])
                    {
                        handleDQ->dequeueWaitFlag = TRUE;
                        PAL_osProtectExit(PAL_OSPROTECT_INTERRUPT,cookieDQ);
                        if (PAL_SOK != PAL_osSemTake(handleDQ->dequeueSem, 2000)){
                            result = DDC_VPFE_E_FAIL;
                        }
                    }

     

    Furthermore , the program doesn't run into the function " DDC_VPFEIsr "

     

    BTW , the default FRAME_HEIGHT and FRAME_WIDTH configured in the original preview on-the-fly are 640*480

    So I configure the i2c to my sensor as 640*480 . Is that correct ? or it should be larger than 640*480 ?

  •  

     

    ellen wang said:

    What I do to this program is configuring the i2c for my sensor mt9p001, and nothing else......

    Are you using the MT9001 camera sensor OR the one whcih you have mentioned above mt9p001. Since our PSP only supports MT9001.

     

    I think we need to find out the reason why the interrupt is not being generated once after receiving the configured resolution 640 * 480 bytes. To do so, Can you please verify the signal from the camera sensor, especially the Vsync and the Hsync?

     

    BTW, which FVID_exchange() is failinf for you? is it for the CCDC or the display?

    i.e FVID_exchange(ccdcHandle, .....) OR FVID_exchange(vid0Handle, .....)

    Thanks and Regards,

    Sandeep K 

  • Thank you !!!

     

    I use MT9P001 , which is different from MT9001(it should be MT9T001 in fact !!!!...)

    MT9P001 : 5M pixel 1/2.5"

    MT9T001 : 3M pixel 1/2"

    They're both Aptina.

    Their i2c,register,address are all the same !!!

    I can configure the i2c to MT9P001 and it works ,VD and HD are change in expectation !!

     

    It goes error at FVID_exchange(ccdcHandle,....)as followed

     

    Here I configure the i2c to MT9P001,and it works.

     ,<<<here's the error message

  • Ellen wang,

    I think, it is better to modify/create the file for the sensor which you are using. It looks like there is something missing in the sensor configuration which is why the interrupt is not being generated. 

    You can refer to the files "E:\BIOS PSP\psp_1_00_02_00\pspdrivers\system\dm6437\bios\dm6437_evm\src\video\src\MT9001_extImageSensor.c & MT9001_extImageSensor.h".

    You need to modify (or create new one,) these files for configurations like, I2C slave address, sensor register set etc. Once after having the files corresponding to sensor MT9P001, you have to add it to build and then use it in the application.

    Please double check the camera sensor register set and its values against the camera sensor data sheet.

    Thanks and Regards,

    Sandeep K

  • Thanks a lot .

     

    I'll double check the i2c configuration in " MT9001_extImageSensor.h "

     

    Here're my hardware setting:

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

    I connect the SDA & SCL from my MT9P001 sensor to the i2c_data & i2c_clk on DC_P2 ON DM6437 board !

    I dont use any other decoder or something to my MT9P001 sensor.

    They are the original cmos_data[7]~cmos_data[0]  (I use only 8 bits per pixel , it can output 12 bits per pixel),VD,HD,PCLK

    They all connect to DC_P1.

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

    However , there's a register which is called " I2C_PCA9543A_SLAVE_ADDR  (0x70) " in "MT9001_extImageSensor.h"

    It really confuses me so far, because there's no such i2c_chip on my DM6437 board !!!

    The only i2c_chip on my board is PCF8574A

    Here's the BIOS_VPFE_Driver_UserGuide:

    "

    MT9001 image sensor peripheral registers are configured using I2C driver. MT9001 image
    sensor will act as Slave device.I2C will communicate with MT9001 using the MT9001 video
    decoder slave address (0x5D).Refer to MT9001 specs for more detail. Before communicating
    with MT9001, VPFE driver also configures PCF8574A I/O expander with the slave address 0x70.
    MT9001_Open function is used to initialize the I2C driver. It configures the I2C for further register
    read and write of MT9001 image sensor. During open call application plugs-in the sensor
    functions using the function pointers provided in the front-end (external decoder) object. It also
    configures PCF8574A I/O expander for MT9001 image sensor.

    "

    My sensor address is 0x5D ,so I can configure my MT9P001 sensor. (MT9T001 is also 0x50)

    If I use the default " I2C_PCA9543A_SLAVE_ADDR  (0x70)" , it'll fail at the beginning as followed and return .

    void I2C_INIT()
    {
        /*Power On I2C*/
        if (PAL_SOK !=
           PAL_sysModuleClkCtrl(PAL_SYS_CLK_MODULE_I2C, PAL_SYS_MODULE_CLK_ENABLE))
        {
            return;
        }
    }

     

    where does PCA9543A come from ? Is it another i2c_chip on MT9T001 sensor ? or it's just a mistake ?

    The BIOS_VPFE_Driver_UserGuide states PCF8574A .

    However , the program states PCA9543A .



  • Thank you .

     

    I don't know how to configure PCA9543A properly .

    Do anyone know what does this chip work for ?

    why I need this i2c chip ?

    I can configure the sensor by using i2c pin_out on DC2 directly !!!

    Maybe someone could tell me what is the original mt9001 hardware look like ?

     

    THANKS