AnsweredAssumed Answered

DCB manager and ADI Timer service

Question asked by Kuranes on Jun 9, 2011
Latest reply on Jun 14, 2011 by SteveM

Hi, I have a question about the use of deferred callback manager with the ADI timer service.


I'm initializing a timer like this:


    ADI_TMR_GP_CMD_VALUE_PAIR Timer0ConfigurationTable [] =
        {ADI_TMR_GP_CMD_SET_TIMER_MODE,            (void *)TIMER_PWM_MODE},
        {ADI_TMR_GP_CMD_SET_COUNT_METHOD,          (void *)TRUE},
        {ADI_TMR_GP_CMD_SET_WIDTH,                 (void *)1},
        {ADI_TMR_GP_CMD_END,                       NULL},

    sslResult  = adi_tmr_Open(ADI_TMR_GP_TIMER_0);

    sslResult |= adi_tmr_GPControl(ADI_TMR_GP_TIMER_0, ADI_TMR_GP_CMD_TABLE, Timer0ConfigurationTable);

    sslResult |= adi_tmr_InstallCallback(ADI_TMR_GP_TIMER_0,
                                         (void *)ADI_TMR_GP_CMD_START,


Instead of NULL, I pass in DcbMgrHandle, the handle to a DCB service I set up elsewhere like this:


      adi_dcb_Init(DcbMgrData, sizeof(DcbMgrData), &sslResponseValue, &DcbMgrHandle);

      adi_dcb_Open(14,                                        //IRQ level
                             &DcbMgrData[ADI_DCB_QUEUE_SIZE],           //queue memory addr
                             (ADI_DCB_ENTRY_SIZE * DCB_QUEUE_ENTRIES),  //size of queue
                             &sslResponseValue,                         //on return this should be DCB_QUEUE_ENTRIES


My question is, how do I set the priority level of the timerCallback?  In the example source, the timer interrupt callback calls adi_dcb_Post() with a priority level, but this is called from an interrupt handler, not a timer callback.  timerCallback in my case already looks like a DCB callback routine, having a prototype like this:


     static void timerCallback(void *AppHandle, u32 Event, void *pArg)


Thanks in advance,