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.

Compiler/TDA4VM: TDA4 - Why the frequency of the timer is different

Part Number: TDA4VM

Tool/software: TI C/C++ Compiler

Hi:

SDK:7.0.0

BIOS:bios_6_82_01_19

I reference to this article:
e2e.ti.com/.../898076

But, why when I create a timer in MCU1_0 as follows, the frequency of the first timer is 250MHz, and the frequency of the second timer is 19.2MHz?

TimerP_Params timerParams;
TimerP_Handle handle;

TimerP_Params_init(&timerParams);
timerParams.runMode = OTOTIMER_RUNMODE_CONTINUOUS;
timerParams.startMode = OTOTIMER_STARTMODE_USER;
timerParams.periodType = OTOTIMER_PERIODTYPE_MICROSECS;
timerParams.period = 1000;
timerParams.arg = params->arg;
timerParams.intfreqLo = 250000000;
timerParams.intfreqHi = 0;
timerParams.extfreqLo = 250000000;
timerParams.extfreqHi = 0;

handle = TimerP_create(id, (TimerP_Fxn)tickFxn, &timerParams);

  • Hi Chun Chu,

    The thread you are referencing was for an older SDK where the different timers were configured at different clocks.

    Can you remove the below lines from the code as now all times should be configured for 19.2MHz.

    timerParams.intfreqLo = 250000000;
    timerParams.intfreqHi = 0;
    timerParams.extfreqLo = 250000000;
    timerParams.extfreqHi = 0;

    Also, I did not quite understand your question, is the question that the time period was not correct when you use the piece of code as mentioned in the post?

    Regards,

    Karan

  • Hi Karan,

    Thanks, I have solved this problem.

    Execute the procedure below to change DMTimer0 to 19.2MHz.

    /* Restoring MCU DMtimer0 FCLK to HFOSC0 (changed by ROM) */
    HW_WR_REG32((CSL_MCU_CTRL_MMR0_CFG0_BASE + CSL_MCU_CTRL_MMR_CFG0_MCU_TIMER0_CLKSEL), 0);