Part Number: PROCESSOR-SDK-AM437X
Tool/software: Code Composer Studio
My current environment details:
- HW: AM437x_idk
- OS: Linux, v.4.2.0-35-generic, x86_64 / gtk 2.24.23
- Code Composer Studio (CCS) version: 8.1.0.00011
- PDK Version: pdk_am437x_1_0_12
I was able to setup the PDK and run the "pdkProjectCreate.sh" for the AM437x_idk board. I could see all the projects (missing the Starterware examples for modules like DMtimer etc) that were built and ready for CCS.
Since I wanted to benchmark the interrupt latency (in my case using a Timer) on the AM437X_IDK, I imported and updated the "UART_BasicExample_idkAM437x_armExampleProject" inside CCS to make use of the Timer functionality. Here's a code snippet for the timer config:
Timer_Params_init(&timerParams);
timerParams.period = 1000; //100usec timer
timerParams.runMode = Timer_RunMode_ONESHOT; //Timer_RunMode_CONTINUOUS; //Timer_RunMode_ONESHOT;
timerParams.periodType = Timer_PeriodType_MICROSECS;
timerParams.startMode = Timer_StartMode_USER;
timerParams.arg = 0;
//timerParams.extFreq.lo = 1000000;
//timerParams.extFreq.hi = 0;
myTimer = Timer_create(Timer_ANY, myIsr, &timerParams, &eb); //Timer_ANY
if (myTimer == NULL) {
System_abort("Timer create failed");
}
In my case, As you can see I am using Timer_ANY, so each timer it defaults to DMTimer0 or sometimes DMtimer2, both of which run at 32768 Hz.
For my Interrupt latency benchmarking I would like to use The other DMTimers which run at 24000000 Hz for better resolution. But each timer I manually try to use any Timer ID other than 0 and 2 my code crashes throwing exceptions. After looking at some forum questions (mentioned below) it became apparent that I need to either add DMTimer3ModuleClkConfig(); function or I need to use the DMTimer library/example from the Starterware and manually configure the clock for other DMTimers.
https://e2e.ti.com/support/legacy_forums/embedded/tirtos/f/355/t/272744?DMTimer-periphery-clock-enabling-DMTimer3ModuleClkConfig-
So my 2 question are:
- How can I make use of the DMTimers 1, 3 through 11 while still using the SYSBIOS/HAL API. If this works the below question is moot.
- How do I create a CCS project for the Starterware/Example/DMTimer ? I have tried to find documentation for over a week but no luck. So any help is appreciated.
Thanks,
Virendra