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 error

Hi

I am working on DM648, in my project,  I found edma3init() and CPIS_init() has conflict.

result = edma3init();

then, I initialize the vicp as follow:

 vicpInit.cacheWbInv = (Cache_wbInv) cacheWb;
    vicpInit.staticDmaAlloc= 1;
    vicpInit.maxNumProcFunc= 1;
    vicpInit.memSize= CPIS_getMemSize(vicpInit.maxNumProcFunc);
    vicpInit.mem= memAlloc(vicpInit.memSize);

 if (CPIS_init(&vicpInit)== -1) {
        printf("\nCPIS_init error\n");
         exit(0);
    }

the result is "CPIS_init error", i dont know why.

 

thanks.

  • Hello,

    There may be some conflicts between (1) the EDMA configuration used by edma3init() and (2) the EDMA configuration used by CPIS_init().

    For (1), you are probably using a file named bios_edam3_drv_sample_dm648_cfg.c provided by the EDMA3LLD at edma3_lld_1_05_01\packages\ti\sdo\edma3\drv\sample\src . This EDMA configuration concerns channels allocated for DSP only.

    For (2), the VICP library is using an EDMA configuration similar to the one provided in  vicp_edma3_dm648_cfg.c located in VICP_INSTALL_DIR\test\src . This EDMA configuration concerns channels allocated for VICP only.

    If in (1) and (2), you have the same channels allocated for DSP and VICP then conflicts can arise. To avoid conflict, you need to modify (1) so there is no overlap in the partitioning between DSP and VICP channels. Actually the modified version of (1) is provided in the release fo the VICP signal processing library at VICP_INSTALL_DIR\test\src . So I am suggesting you to use this version instead of the one provided by the EDMA3 LLD.Please give it a try.

    If it still doesn't work, don't call edma3init() and see what happens. Verify also you are using edma3lld 1.05.00 .

     

  • Hi:

    I just replaced  bios_edam3_drv_sample_dm648_cfg.c at edma3_lld_1_05_01\packages\ti\sdo\edma3\drv\sample\src  with the one at VICP_INSTALL_DIR\test\src ,but the confliction still there. I am not sure the simple replacement is right.

    thanks.

  • Can you try to remove the call to edma3init() and see whether CPIS_init() still fails ?

    If it still fails, please attach your test project and we will try to reproduce the issue here.

  • Hi

    I have attached my test project, please check it.

    I called  the edma3init() and CPIS_init() in main();

    either of them works well when other is removed.

    thanks.

    evmDM648.rar
  • Hello Yi Zeng,

     

    Thanks for the project. I could reproduce the problem and found a bug in vicp_edma3_support.c .

    Line 108 should be changed to:

    initCfg.isMaster    =    FALSE;

    and line 116 should be changed to:

    miscParam.isSlave = TRUE;

    After making these changes, please include the following 2 files in your video_preview.pjt:

    - the just modidifed vicp_edma3_support.c

    - the bios_edma3_drv_sample_dm648_cfg.c file that came along with the vicp library.

    If you don't include this last file, the project will use the one linked within edma3_drv_bios_sample.lib, which has EDMA configuration conflicting with VICP.

    We will include the corrected vicp_edma3_support.c in VICP signal processing library v3.2 and also update dmcsl648_bios.lib accordingly.

  • Also a side note to my previous answer. By default, the file vicp_edma3_support.c is linked into dmcsl648_bios.lib. But since there is a bug, you should include the corrected one in your project to override the implementation inside dmcsl648_bios.lib . For next version 3.2 of the library, you will no longer need to include the file in your project since the library dmcsl648_bios.lib will be updated with the correct vicp_edma3_support.c.

  • thanks,Victor,it works now.have a nice day.

  • We worked quite a lot on VICP of DM648 on a real-time video recording production. We were able to sort out several issues related to EDMA conflicts in addition to the ones explained here. If you need assistance on VICP of DM648, please contact andrew [at] race-technology.com

  • 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)