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.

Timer can't work in dsp

Hi all,

I tried to create a timer in dsp application on DM8168, Timer_create returns correct, but the Timer_Func can't be called. My code is as following:

Timer_Params timer_params;

Error_Bolck eb;

Error_init(&eb);

Timer_Params_init(&timer_params);

timer_params.period = 500;

timer_params.periodType = Timer_PeriodType_MIRCOSECS;

timer_params.startMode = Timer_StartMode_USER;

timer_handle = Timer_Create(Timer_ANY, timerFunc, &timer_params, &eb);

if(timer_handle == NULL) {

...

}

Timer_start(timer_handle);

Above code is executed in a task, timer_handle returns correct, but timerFunc never be called. Dose any one can help, thanks!

 

BR,

Lihui

  • please referto the following 

    ./links_common/nullSrc/nullSrcLink_priv.h:    Clock_Handle timer;
    ./links_common/nullSrc/nullSrcLink_tsk.c:    Clock_start(pObj->timer);
    ./links_common/nullSrc/nullSrcLink_tsk.c:    Clock_stop(pObj->timer);
    ./links_common/nullSrc/nullSrcLink_tsk.c:    Clock_delete(&pObj->timer);
    ./links_common/nullSrc/nullSrcLink_tsk.c:    pObj->timer = Clock_create(NullSrcLink_drvTimerCb,
    ./links_common/nullSrc/nullSrcLink_tsk.c:                               pPrm->timerPeriod, &clockParams, NULL);

  • Thank you, I can use clock in my app, but I want to execute an algorithm every 125us, and clock can't run every 125us, so I must use hardware timer.