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.

Video Demo Using VICP on DM648

Hi,

We have developed a demo using VICP on DM648 ,

however it takes 100% CPU Time. What are the best way to re-design the application so that we get a 50% utlization of CPUTime, Thanks in Advance

 

Prabhakar

  • Do you run any algorithm on DSP except the VICP library ?

    If not, then very likely the 100% load is due to the way you synchronizing with VICP interrupt: the example shipped with the library uses busy waiting for a flag inside CPIS_wait():

    void CPIS_isr() {

        VICPIntFlag= 1;

    }

    Int32 CPIS_wait_Fxn(void *arg) {

        while (VICPIntFlag==0);

            VICPIntFlag= 0;

        return 0;

    }


    However this is not efficient as the while (VICPIntFlag==0); actively uses the CPU to poll for the VICPIntFlag.  The most efficient way is to use semaphore instead of global flag VICPIntFlag.

     

     

    void CPIS_isr() {

       SEM_post(vicp_semaphore);

    }

     

     

    Int32 CPIS_wait_Fxn(void *arg) {

        SEM_pend(vicp_semaphore);

        return 0;

    }

     

    The global variable vicp_sempahore of type SEM_handle will have to be created in main() using SEM_create().

     

    regards,

     

    Victor