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.

Frequency mismatch problem in ICE v2

Other Parts Discussed in Thread: AM3359, SYSBIOS

Hi,

I am having hard time in debugging ISDK sample codes on AM3359 ICE(ver 2) board.
CCS -> v5.5
SDK -> am335x_sysbios_ind_sdk_1.1.0.3
GEL -> TMDXICE3359_v2_1A.gel
code -> C:\ti\am335x_sysbios_ind_sdk_1.1.0.3\sdk\examples

There was no problem running these examples in the previous version of the ICE board,
but with the latest board it runs properly sometimes, but most of the time when I try to run the
program through Run → Load → Load Program, the console shows below error saying there is a
frequency mismatch and I am not able to debug futher, the same message is shown even if I retry
with CPU Reset(HW) and EVM Initialization(GEL).

[CortxA8] ti.sysbios.timers.dmtimer.Timer: line 1099: E_freqMismatch: Frequency mismatch: Expected 32768 Hz,
         actual: 21945621 Hz. You need to modify Timer.intFreq.lo to match the actual frequency.

This message seems we need to make some settings in the SYS/BIOS also,
but don't know exactly what to do and moreover this error was not there when I was using ICE ver1.

Please let me know if there is any suggestion on this error.

Regards
Prad

  • Hi Prad,

    the error is generated by a simple sanity check function by SYS/BIOS. I'm not sure who is supposed to set up your system clock, but from my guess here the gel file from your previous ICE board left the CPU frequency at its default.

    You have 2 options here, either find the code that configures the clock and comment it out (perhaps in the gel file) or tell SYS/BIOS of the new CPU frequency. Updating SYS/BIOS with the new frequency can be done during runtime or config time.

    Runtime:

    Types_FreqHz freq;
    freq.hi = 0;
    freq.lo = 21945621;
    BIOS_setCpuFreq(&freq);

    Config time:

    var BIOS = xdc.useModule('ti.sysbios.BIOS');
    BIOS.cpuFreq.hi = 0;
    BIOS.cpuFreq.lo = 21945621;

  • Prad,

    You can also ignore the sanity check by adding the following in the *.cfg file

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

    Regards,
    Vinesh