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.

E_freqMism

Other Parts Discussed in Thread: SYSBIOS

Hi

 

I'm trying to switch my old working C674 project to the latest SYS/BIOS and XDCtools. It builds fine, but when I load it, I end up in my ErrorHook() before reaching main(). The error I get is "E_freqMism"

What is this error?

BR

Niklas

My .cfg looks like this

var ti_sysbios_BIOS = xdc.useModule('ti.sysbios.BIOS');
ti_sysbios_BIOS.libType = ti_sysbios_BIOS.LibType_NonInstrumented;
var ti_sysbios_knl_Clock = xdc.useModule('ti.sysbios.knl.Clock');
var ti_sysbios_knl_Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
var ti_sysbios_knl_Mailbox = xdc.useModule('ti.sysbios.knl.Mailbox');
var ti_sysbios_knl_Task = xdc.useModule('ti.sysbios.knl.Task');
ti_sysbios_knl_Task.common$.namedInstance = true;

var Timestamp = xdc.useModule('xdc.runtime.Timestamp');

var xdc_runtime_Assert = xdc.useModule('xdc.runtime.Assert');
var xdc_runtime_Error = xdc.useModule('xdc.runtime.Error');
var xdc_runtime_LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');

var instxdc_runtime_LoggerBuf0Params0 = new xdc_runtime_LoggerBuf.Params();
instxdc_runtime_LoggerBuf0Params0.numEntries = 320;

var instxdc_runtime_LoggerBuf0 = xdc_runtime_LoggerBuf.create(instxdc_runtime_LoggerBuf0Params0);
var xdc_runtime_Log = xdc.useModule('xdc.runtime.Log');

var xdc_runtime_System = xdc.useModule('xdc.runtime.System');
var xdc_runtime_Main = xdc.useModule('xdc.runtime.Main');
var xdc_runtime_SysStd = xdc.useModule('xdc.runtime.SysStd');
var xdc_runtime_Defaults = xdc.useModule('xdc.runtime.Defaults');

ti_sysbios_knl_Clock.tickPeriod = 1000;
var Memory = xdc.useModule('xdc.runtime.Memory');

var heap_ext_cached = xdc.useModule('ti.sysbios.heaps.HeapMem');
var heap_ext_uncached = xdc.useModule('ti.sysbios.heaps.HeapMem');

var heap_ext_cached_params = new heap_ext_cached.Params();
heap_ext_cached_params.sectionName = ".heap_ext_cached";

var heap_ext_uncached_params = new heap_ext_uncached.Params();
heap_ext_uncached_params.sectionName = ".heap_ext_uncached";
heap_ext_cached_params.size = 8388608;
heap_ext_uncached_params.size = 0x700000;
ti_sysbios_knl_Clock.tickSource = ti_sysbios_knl_Clock.TickSource_TIMER;

var ti_sysbios_family_c64p_Cache = xdc.useModule('ti.sysbios.family.c64p.Cache');
ti_sysbios_family_c64p_Cache.MAR0_31 = 0;
ti_sysbios_family_c64p_Cache.MAR128_159 = 0x00000000;
ti_sysbios_family_c64p_Cache.MAR192_223 = 0x00000002;

var ti_sysbios_family_c64p_Hwi = xdc.useModule('ti.sysbios.family.c64p.Hwi');
var instti_sysbios_family_c64p_Hwi1Params0 = new ti_sysbios_family_c64p_Hwi.Params();
instti_sysbios_family_c64p_Hwi1Params0.eventId = 20;
var instti_sysbios_family_c64p_Hwi1 = ti_sysbios_family_c64p_Hwi.create(5, "&DMA_transfer_complete", instti_sysbios_family_c64p_Hwi1Params0);

ti_sysbios_knl_Task.addHookSet({switchFxn: '&TaskSwitchHook',});

var ti_sysbios_family_c64p_Exception = xdc.useModule('ti.sysbios.family.c64p.Exception');
ti_sysbios_family_c64p_Exception.exceptionHook = "&ExceptionHook";

var ti_sysbios_family_c64p_EventCombiner = xdc.useModule('ti.sysbios.family.c64p.EventCombiner');
ti_sysbios_family_c64p_EventCombiner.eventGroupHwiNum = [10,11,13,15];

xdc_runtime_System.SupportProxy = xdc_runtime_SysStd;
xdc_runtime_Error.raiseHook = "&ErrorHook";

var inst_heap_ext_cached = heap_ext_cached.create(heap_ext_cached_params);
var inst_heap_ext_uncached = heap_ext_uncached.create(heap_ext_uncached_params);

Program.global.heap0 = inst_heap_ext_cached;
Program.global.heap1 = inst_heap_ext_uncached;

Memory.defaultHeapInstance = Program.global.heap0;

  • The error being reported is coming from the ti.sysbios.timer.dmtimer.Timer module.

    It indicates that the frequency the DM timers are actually being clocked at varies significantly from the expected frequency for the device you are using.

    The frequency check was added to SYS/BIOS specifically because of the widespread occurrence of this problem and the confusing consequences that follow if not corrected.

    To correct the problem, the Timer module must be informed of the actual frequency that the timers are being clocked at.

    The following FAQ describes how this is done:

        http://processors.wiki.ti.com/index.php/SYS/BIOS_FAQs#6_Overriding_the_default_Timer_frequency

    Since the frequency measurement relies on knowing the frequency that the CPU is running at, the problem could also be due to this being configured incorrectly.

    The default CPU frequency is passed to BIOS from the platform definition. If that is incorrect for your actual hardware, you can inform BIOS of the correct CPU frequency in your config file:

        var BIOS = xdc.useModule('ti.sysbios.BIOS');

        BIOS.cpuFreq.lo = (your frequency, in Hz, here);

    Which C674 device are you building for?

    Alan