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.

dmtimer frequency mismatch - redux

Other Parts Discussed in Thread: SYSBIOS

Hi,

I have the error in the post: http://e2e.ti.com/support/embedded/f/355/p/139836/504786.aspx.    Hardware is the Mistral 8148, the build is my own executable, that was working (doing nothing with one task) earlier in the week, ... but I don't know when it started.   I upgraded from CCS5.1.0.07001 to CCS5.1.0.08020 yesterday.   I've also changed from BIOS 6.32.4.49 to 6.32.5.54.

I don't see these lines in the former post:

var Timer = xdc.useModule(‘ti.sysbios.timers.dmtimer.Timer’);
Timer.checkFrequency = false;


in my .cfg file source, am I looking in the wrong place?

 

I do create a timer in my code, like this:

Clock_Params_init(&clkParams);
    clkParams.period = 5;
    clkParams.startFlag = TRUE;
    Clock_create((ti_sysbios_knl_Clock_FuncPtr)softTimer_1mS, 5, &clkParams, NULL);
    Clock_start(soft_1ms);

 

This is what I get when I 'load' the program, 3 separate loads (doesn't let me run when it finishes - points to Abort()).

[C674X_0] ti.sysbios.timers.dmtimer.Timer: line 1031: E_freqMismatch: Frequency mismatch: Expected 32768 Hz, actual: 761421 Hz
xdc.runtime.Error.raise: terminating execution

[C674X_0] ti.sysbios.timers.dmtimer.Timer: line 1039: E_freqMismatch: Frequency mismatch: Expected 32768 Hz, actual: 908900 Hz.  You need to modify Timer.intFreq.lo to match the actual frequency.
xdc.runtime.Error.raise: terminating execution

[C674X_0] ti.sysbios.timers.dmtimer.Timer: line 1039: E_freqMismatch: Frequency mismatch: Expected 32768 Hz, actual: 367262 Hz.  You need to modify Timer.intFreq.lo to match the actual frequency.
xdc.runtime.Error.raise: terminating execution

Any ideas what happened?

Thanks,
Matt

 

  • Matt --

    Your CPU is probably running at 20MHz.


    The 'Timer.checkFrequency = false' was a workaround to disable the timer check which was coded incorrectly in 6.32.04.49.   

    The timer validation was fixed in 6.32.05.54 so this  checkFrequency should be set to 'true' which is the default.   The check is now working correctly, but unfortunately the "actual" value printed is not accurate and we'll fix this.


    Your timer is probably running at 20MHz.

     

    Have you tried this (careful with copy paste as quote characters may not be ASCII)

     

    var Timer = xdc.useModule(‘ti.sysbios.timers.dmtimer.Timer’);

    Timer.intFreq.lo = 20000000;   // 20MHz

    Timer.intFreq.hi = 0;

  • Hi,

    My .cfg file has the following line:

    var Timer = xdc.useModule('ti.sysbios.hal.Timer');

    which is different from the line above.   I tried setting Timer.intFreq.lo and it says ti.sysbios.hal.Timer does not have that property.

    Going through the Mistral BOM, there is 32768, 24.576M, 20M, two 25M, and two 22.579M crystals on the board.

     

    Should I change the line above to say '.timers.dmtimer.Timer'?

     

    Br,
    Matt

     

     

  • I replaced the var Timer = xdc.useModule('ti.sysbios.hal.Timer');


    line with your line and it built and loaded.


    This line is a replacement for var Timer, or an addition?   It is expected that its not there already?


    Running again now.

     

    Thanks,
    Matt

  • You can have both in your .cfg file.   The hal.Timer module is a portable timer interface.   You can use hal/Timer.h on all architectures.   dmtimer/Timer.h extends this with more APIs.

    If you have both in your .cfg file, you should probably name the 2nd one:

    var dmTimer = xdc.useModule('ti.sysbios.timers.dmtimer.Timer');

    And use dmTimer.blah = xyz to change the config params.

     

    -Karl-