I'm developing DSP software to run on a DM8148 platform. I'm using SYSBIOS v6.31.04.27 and XDC version 3.20.08.88.
I have several questions regarding the SYSBIOS clock, and DSP clock frequency.
My software uses a periodic function that is to be called at a 1 ms rate. I dynamically create a SYSBIOS clock object in my main ( ) function:
#include <ti/sysbios/knl/Clock.h>
Clock_Params clkParams;
Clock_Params_init(&clkParams);
clkParams.period = 500; // this setting is part of the issue!
clkParams.startFlag = TRUE;
Clock_create(GpakSchedulingTimer, 1, &clkParams, NULL);
To get a rough idea of whether the clock period is set correctly, I compare a 10-second interval as measured on a stopwatch with a 10 second interval measured in software (i.e., hit a breakpoint after 10,000 interrupts). Both counts begin when I set a variable in the watch window.
In addition, each time the periodic function runs, the Timestamp_get32() API function is called and the delta number of ticks between interrupts is computed.
Here are the results I see for two different clock period settings:
Period time for 10,000 ints delta-ticks between ints
500 about 10 seconds 425,000
1000 about 18 seconds 850,000
I'm trying to understand these results, I first need a few more pieces of information.
The DSP clock PLL configuration is performed by u-boot, and supposedly sets the clock to 500 MHz. I'm unable to find the PLL_DSP configuration registers in the DM8148 datasheet to verify this(tms320dm814x.pdf SPRS647B, September 2011). Where can I find the PLL_DSP register descriptions and their addresses?
I also want to determine the clock source for the timer that was configured when I created the clock. I assume this clock object is also used by SYSBIOS to provide the system tick - is that correct?
Which timer (1-7) does SYSBIOS claim, and is there a guarantee that Linux on the ARM will not use that timer?
Section 2.3.9 of the TMS320DM814x Technical Reference Manual (SPRUGZ8, September 2011) indicates that each timer has an 8-to-1 mux to select its functional clock. The mux is denoted as DMTIMERm_CLKSRC. I'm unable to locate a register or bit-field by that name in either the datasheet or Technical Reference. How can I determine A) which timer SYSBIOS is using, and B)what clock signal is driving the timer?
Does the clock frequency of the timer's functional clock need to be taken into account when configuring the period parameter during clock creation?
I realize I'm asking a lot of questions here, and thank you in advance for your help and patience.
Thanks,
Jim