AnsweredAssumed Answered

How to use IVG14 or IVG 15 in BF512

Question asked by EvanQiu on Sep 22, 2014
Latest reply on Sep 22, 2014 by Andreas

I want to use IVG14 as software interrupt in my project, but it don't work.

 

as follow:

1.init part

 

    ADI_INT_RESULT result;
    result = adi_int_CECHook( IVG14,

 

                     UserInterruptFunc,

                     (void *)0x0000000F,

                     TRUE);

 

    if (ADI_INT_RESULT_SUCCESS == result)

 

    {

        printf("\r\n>>ADI_INT_RESULT_SUCCESS");

    }

    else

    {

        printf("\r\n>>error");

    }

2.interrupt function

 

static ADI_INT_HANDLER_RESULT UserInterruptFunc(void *ClientHandle)

 

{

    static u32 count;

    printf("\r\nUserInterruptFunc %d", count++);

return (ADI_INT_RESULT_PROCESSED);

}

 

3.trigger user interrupt in 2ms timer interrupt handle

 

        if (timer2_count++ >= (1000/2))//1s

 

        {

            timer2_count = 0;

            raise(IVG14);

        }

 

But no printf("\r\nUserInterruptFunc %d", count++) execute, I don' t know why?

Can you help me, thanks~

Outcomes