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 periphery clock enabling, DMTimer3ModuleClkConfig();

Other Parts Discussed in Thread: AM3359, SYSBIOS

Hey,

I'm trying to run a timer for triggering a Hwi in order to realize some Hard Realtime applications.

My HW / SW Setup is:

- Code Composer Studio v5.4.0.00091with xdctools_3_25_00_48 and bios_6_35_01_29

- AM3359 on ICE Evalboard

Following chapter 7.3 of the BIOS User Guide Document I wrote the following code to start the timer dynamic:

-----------------------------------------------------------------------------------------------

#include <xdc/std.h>
#include <xdc/runtime/Error.h>
#include <xdc/runtime/System.h>
#include <ti/sysbios/BIOS.h>
#include "sys_mmu.h"
#include <ti/sysbios/hal/Hwi.h>
[...]
#include <ti/sysbios/timers/dmtimer/Timer.h>

unsigned long u32CntVar;

void hwi0Func(UArg a0)
{
    u32CntVar++;
}


Void main()
{
    System_printf("enter main()\n");
    mmuInit(applMmuEntries);

[...]

    Timer_Params timerParams;
    Timer_Handle myTimer;

    Timer_Params_init(&timerParams);
    timerParams.period = 100;
    timerParams.periodType = Timer_PeriodType_MICROSECS;
    timerParams.arg = 1;
    timerParams.extFreq.lo = 320000000;
    timerParams.extFreq.hi = 0;

    myTimer = Timer_create(1, hwi0Func, &timerParams, NULL);     //DMTIMER3

    if (myTimer == NULL)
        System_abort("Timer create failed");

    BIOS_start();

}

-----------------------------------------------------------------------------------------------

The timer_create() routine alway crashes with the Exception: "ti.sysbios.family.arm.exc.Exception: line 176: E_dataAbort"

Other users in this community had similar problems. One point I read is that the timer periphery has to be clocked first. I wanted to add:

DMTimer3ModuleClkConfig();

before the timer_create() funktion but could not resolve this Routine.

What file do i have to include for this routine?

Why does the BIOS User Guide not refer to the DMTimerXModuleConfig(); function?

Do I misunderstand this issue?

Regards,

Tim

Ref.: http://e2e.ti.com/support/embedded/bios/f/355/p/270912/946530.aspx

  • Hi,

    This API is a part of Starterware platform libraries for AM335x, not a part of SYSBIOS.

    If you are using Industrial SDK, then library path is this - "${IA_SDK_HOME}/starterware/binary/armv7a/cgt_ccs/am335x/evmAM335x/platform/platform.lib"

    Where IA_SDK_HOME is your sdk installation path. The header file is ${IA_SDK_HOME}\starterware\include\armv7a\am335x\evmAM335x.h" 

    Regards,

    Shahid

  • Shaid,
    this was the solution to my problem, thanks!
    I added "${IA_SDK_HOME}/starterware/include/armv7a/am335x" to the Compiler Include Options and with #include "evmAM335x.h" the function is now resolved.