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.

OMAM-L138, ARM, SYS/BIOS 6.33.5.46, HWI problem

Other Parts Discussed in Thread: OMAP-L138, SYSBIOS

Hello,

I am running SYS/BIOS on OMAP-L138 ARM core. SYS/BIOS configuration looks like that:

When I am trying to use Timer 0 and configure the interrupt handler (int 21) I am receiving following error on the console:

[ARM9_0] ti.sysbios.family.arm.da830.Hwi: line 146: E_alreadyDefined: Hwi already defined: intr# 21

The int 21 is first time passed to Hwi_create and nothing is using it. Why I am receiving this error if even the clock module is dropped?

  • Hi Damian Gowor,

    Can you please attach your *.cfg file?

    Steve

  • Hello Steve,

    Here is my config file:

    var Defaults = xdc.useModule('xdc.runtime.Defaults');
    var Diags = xdc.useModule('xdc.runtime.Diags');
    var Error = xdc.useModule('xdc.runtime.Error');
    var Log = xdc.useModule('xdc.runtime.Log');
    var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
    var Main = xdc.useModule('xdc.runtime.Main');
    var Memory = xdc.useModule('xdc.runtime.Memory');
    var SysMin = xdc.useModule('xdc.runtime.SysMin');
    var System = xdc.useModule('xdc.runtime.System');
    var Text = xdc.useModule('xdc.runtime.Text');
    var Task = xdc.useModule('ti.sysbios.knl.Task');
    var Event = xdc.useModule('ti.sysbios.knl.Event');
    var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
    var Cache = xdc.useModule('ti.sysbios.family.arm.arm9.Cache');
    var Exception = xdc.useModule('ti.sysbios.family.arm.exc.Exception');
    var Mmu = xdc.useModule('ti.sysbios.family.arm.arm9.Mmu');
    var ti_sysbios_hal_Cache = xdc.useModule('ti.sysbios.hal.Cache');
    var ti_sysbios_family_arm_da830_Hwi = xdc.useModule('ti.sysbios.family.arm.da830.Hwi');


    //************ CACHE DEFINITION ************

    Cache.enableCache = true;
    Mmu.enableMMU = true;
    var peripheralAttrs = {
    type : Mmu.FirstLevelDesc_SECTION, // SECTION descriptor
    bufferable : false, // bufferable
    cacheable : false, // cacheable
    };

    var peripheralBaseAddr = 0x01E00000; /* substitute the 1MB base address of your peripheral here */

    Mmu.setFirstLevelDescMeta(peripheralBaseAddr, peripheralBaseAddr, peripheralAttrs);
    peripheralBaseAddr = 0x01D00000;
    Mmu.setFirstLevelDescMeta(peripheralBaseAddr, peripheralBaseAddr, peripheralAttrs);

    // ************ END CACHE DEFINITIONS ************


    Program.argSize = 0x0;

    System.maxAtexitHandlers = 4;

    Program.stack = 0x20000;

    SysMin.bufSize = 0x800;

    var loggerBufParams = new LoggerBuf.Params();
    loggerBufParams.numEntries = 16;
    var logger0 = LoggerBuf.create(loggerBufParams);
    Defaults.common$.logger = logger0;
    Main.common$.diags_INFO = Diags.ALWAYS_ON;

    var SysStd = xdc.useModule('xdc.runtime.SysStd');
    System.SupportProxy = SysStd;

    Task.defaultStackSize = 4096;
    Task.deleteTerminatedTasks = true;
    Memory.defaultHeapSize = 9437184;

  • Hi Damian Gowor,

    The Clock module is probably being pulled into your application by another BIOS module.  Can you open ROV in CCS and look at the Clock module for your application?

    Do you see Hwi 21 assigned to anything?

    For example, I loaded a BIOS app on my board and I see that Hwi 21 is assigned to the 'doTick' fxn:

    Steve

    Id_22

  • Hi Steve,

    Yes, you were right. It is assigned to ti_sysbios_knl_Clock_doTick__I. So what I can do now to delete this assignment? Is it needed? And why it is there?

    What else I can see is that the int 22 is assigned to ti_sysbios_timers_timer64_TimestampProvider_rolloverFunc__F !!

  • Hi Damian Gowor,

    The doTick function is the BIOS system tick.

    I wanted to point you to the SYS/BIOS User's Guide as I think the following section may help clear things up for you:

    5.1 Overview of Timing Services

    You can find the User's Guide in your SYS/BIOS installation.  For example, it's here on my machine: "C:\ti\bios_6_33_01_25\docs\Bios_User_Guide.pdf"

    Steve

  • Steve,

    I know this document. It doesn't explain why SYS/BIOS uses  those interrupts when the modules are disabled. Is it a desirable action? Yesterday I disabled those interrupt assignments by (!) :

    1. Enabling clock module.

    2. Setting up user tick mode.

    3. Enabling TimeStamp module (which I don't need).

    4. Setting up the TimeStamp module to driver specific.

    5. Setting up the TimeStamp module to use system clock.

    To disable assignment you must to do this things instead of only disabling those modules and for sure it is not explained in "C:\ti\bios_6_33_01_25\docs\Bios_User_Guide.pdf". Do you know where I can find information about this? I mean any PDFor website? Is any other way to do it?

  • Hi Damian Gowor,

    Can you try adding the following configuration code to your *.cfg file?  This will tell BIOS to choose a different timer other than Timer id 0 and should free up interrupt 21 for you:

    var Clock = xdc.useModule("ti.sysbios.knl.Clock");

    Clock.timerId = 1;

    Steve

  • Hi Steve,

    This solution is useless for me because I don't want to SYS/BIOS use any timer. Thanks anyway. 

  • Hi Damian Gowor,

    Ok, perhaps I misunderstood what you were trying to do.  If you don't want BIOS to use any Clocks or Timers then you need the following setting:

    BIOS.clockEnabled = false;

    However, be sure that your application does NOT use any TIMEOUTS (i.e. Task_sleep(), XXX_pend() with a timeout, etc).

    Steve

  • Hi Steve,

    Is there a similar setting to disable the TimeStamp interrupt?

  • Do you have a useModule for TimestampProvider in your *.cfg file?

    Damian Gowor said:
    What else I can see is that the int 22 is assigned to ti_sysbios_timers_timer64_TimestampProvider_rolloverFunc__F !!

    Any chance you set the following to false?

        TimestampProvider.useClockTimer = false;

    I see that the TimestampProvider code is creating a timer for the 'rolloverFunc()" in its code if it's false:

    if (TimestampProvider.useClockTimer == false) {
        var  timerParams = new Timer.Params();

        timerParams.period = Timer.MAX_PERIOD;
        timerParams.periodType = Timer.PeriodType_COUNTS;
        timerParams.runMode = Timer.RunMode_CONTINUOUS;
        timerParams.startMode = Timer.StartMode_USER;

        mod.timer = Timer.create(TimestampProvider.timerId,
                TimestampProvider.rolloverFunc,
                timerParams);

        Startup.lastFxns.$add(TimestampProvider.startTimer);
    }
    else {
        mod.timer = null;
    }

    Steve