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.

VICP Initialization Problem - DM6441

I'm trying to use the VICP on the DM6441 device to offload some DSP processing.  However, I am unable to initialize the VICP.  The CPIS_init() function returns a -1 and the error code is CPIS_INIT_ERROR.  I tracked the error as far into the source code as I could, and I found that a function called IP_RUN_init() in imgproclib.c is failing which produces the error.  I do not think we have the source code for this function so I cannot go any further to debug.  I am using version 3.2 of the VICP image processing library for the DM6441.  Below you will find the parameters that I am providing to the CPIS_init function:

 

vicpInit.cacheWbInv = (Cache_wbInv) BCACHE_wb;

vicpInit.staticDmaAlloc = 1;

vicpInit.maxNumProcFunc = 1;

vicpInit.memSize = CPIS_getMemSize(vicpInit.maxNumProcFunc);

vicpInit.mem = MEM_alloc(0, ((vicpInit.memSize+127)>>7)<<7, 128);

 

Any assistance with this problem is greatly appreciated.

  • Jason,

    Please see the post: http://e2e.ti.com/forums/p/11053/43025.aspx#43025

    and add to your project the files in attachment.

    Victor

     

  • Victor,

    Thanks, this seemed to make a difference.  However, I found that I have to do a CPIS_deInit call before the CPIS_Init call in order to not get an error.  Is there a reason for this that you know of?  It seems to work but I don't understand why I have to do that.

    May I ask what's different about the two files that have to be added to the project?  Did you simply merge the initialization within the two files so that they do not conflict?

  • Jason,

    You shouldn't need to call CPIS_deInit() before.

    I am attaching new files since I found that even with the previous file, the EDMA config between VICP and DSP were still overlapping. Let me know if works better. You shouldn't need to call CPIS_deInit().

    If you still need, I would like to know which lines in CPIS_deInit():

    IP_RUN_deInit() or VICP_EDMA3_deinit() is responsible of clearing the error. Can you comment one line and then the other and let me know how the behaviour changes ? Thanks.

     

    vicp_edma_cfg64xx.zip
  • Victor,

    I tried your new files but I get the same thing.  The reason I figured out that CPIS_deInit call worked to fix the error is because I call the VICP 3 times in my code.  I noticed that the error code came back -1 on the first try, but then 0 on the subesquent calls.

    I will do your test when I get a chance, but this has turned into a backburner issue for the time being.  I was trying to use the VICP to help with JPEG compression, but now I have shifted gears to trying to use the TI JPEG Encoder codec.  I've actually made another post about a problem I'm having with this (http://e2e.ti.com/forums/t/11151.aspx).  If you or anyone else could help out with this that would be greatly appreciated.

    Thanks,

    Jason

  • Hi,

    I am developing an application on DM6446 EVM board with ARM9, DSP, VICP and some peripherals
    I got a problem and don't find any solution for that, would you mind help me to solve that?
    Before please note my design details:

        1 - The ARM is master and control other parts of system
        2 - The boot process is executed from NAND (BTSEL == 00), So after power on, the RBL (ROM Boat Loader) copies
            second level boot loader from NAND to ARM IRAM and then my application is loaded to DDR
        3 - Based on "spraai4.pdf" and "sprue14c.pdf" documents, I used the ubl to load my own application to DDR
            (it is noted that my application does not use any linux so I dont use uboot, I developed specific application)
        4 - Binary file of my ARM application from .out was generated with tms470.exe in CCS v3.3
        5 - Settings for NAND is J4=NAND, S3[1..4] = 0000 (NAND boot, 8-bit AEMIF, ARM boots DSP)
        6 - In my application, first some peripherals of systems (PINMUX, UART, I2C, VPSS) are configured, then DSP and
            VICP codes are copied to DDR, then DSPBOOTADDR is programed and finally the ARM releases C64x+ DSP from reset,
        7 - The DSP&VICP codes are included in ARM binary file as a header
        8 - To program NAND flash I use flash_burn_utility based on following web site
            (http://wiki.davincidsp.com/index.php?title=Serial_Boot_and_Flash_Loading_Utility)
        9 - The value of PSC_MDSTAT_IMCOP register (0x01C418A0)is 0x1E03 and the value of PSC_MDCTL_IMCOP register (0x01C41AA0) is 0x0003
            (I tested them with 0x1F03 and 0x0103 respectively but there is no difference)

    All parts of my design works correctly except VICP (actually IMX does not generate interrupt for completion of procedure). for example, I checked above procedure with simple DSP example ("blinding a LED") and the DSP boots and works correctly

    Also I checked program with JTAG Emulator when DSP_BT == 1 (J4=NAND, S3[1..4] = 0001), and VICP works correctly in this condition,
    Under this circumstances, I flashed NAND but ARM does not boot when DSP_BT == 1(J4=NAND, S3[1..4] = 0001),

    I dont really know why VICP does not work when DSP_BT == 0, is it need to initialze EDMA, INTC, MCBSP, ...?
    Does EDMA3LLD configuration after system power on conflicts with VICP?
    (I dont initialze and configure EDMA3 in ARM application because I think the DSP program initializes it automatically before using VICP in CPIS_Init method)