Post Go back to editing

I want to extend the timer

Category: Software
Product Number: ADSP-21565
Software Version: CrossCore Embedded Studio 2.11.0

Hi.

I am waiting for the filter to settle using a timer. While the timer was running, a change occurred in the filter. I want to reset the timer to allow time for the modified filter to settle.

How can I extend the duration of a timer while it is running?

What should I do?

I'm starting Timer like this.

*pREG_TIMER0_TMR1_WID=TIMER_WIDTH_10*WAITCOEF_GEQ[0];
*pREG_TIMER0_RUN=((1 << BITP_TIMER_RUN_TMR01) & BITM_TIMER_RUN_TMR01); // Enable the timer

Here are the timer settings

// Open the timer
adi_tmr_Open(GEQ_TIMER_NUM, TimerMemory01, ADI_TMR_MEMORY, TimerHandler_GEQ, NULL, &ghTimer01);
// Set the mode to PWM OUT
adi_tmr_SetMode(ghTimer01, ADI_TMR_MODE_SINGLE_PWMOUT);
// Set the timer width
adi_tmr_SetWidth(ghTimer01, TIMER_WIDTH_10);
// Set the timer_delay
adi_tmr_SetDelay(ghTimer01, TIMER_DELAY);
adi_tmr_EnableGracefulStop(ghTimer01, true);
adi_tmr_SetClkInSource(ghTimer01, ADI_TMR_CLKIN_SYSCLK);
adi_tmr_SetPulsePolarity(ghTimer01, false);
adi_tmr_DisableOutput(ghTimer01, true);
adi_tmr_SetEmuRun(ghTimer01, true);
adi_tmr_SetIRQMode(ghTimer01, ADI_TMR_IRQMODE_WIDTH_DELAY);
// Open the timer

Thanks & Best Regards,

YAMAMOTO

  • Hi,

    Unfortunately, you cannot extend a timer’s duration while it is running in ADI_TMR_MODE_SINGLE_PWMOUT mode. However, if you use ADI_TMR_MODE_CONTINUOUS_PWMOUT, you can modify the Period/Width parameters while timer is running, and it will reflect in next cycle.

    Regards,
    Nandini C

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.