Other Parts Discussed in Thread: SYSBIOS
Tool/software: TI-RTOS
I tried to setup a clock with 10us period but I got the period of 8.2us.
pdk_k2g_1_0_7
bios : 6.46.5.55
xdctools_3_32_01_22_core
In my .cfg, I have the following settings
var Clock = xdc.useModule('ti.sysbios.knl.Clock');
Clock.tickPeriod = 10; // 10us
In my .c code, I setup period to be 1.
Error_init(&eb);
Clock_Params_init(&clockParams);
clockParams.period = 1; /* 1 clock ticks */
clockParams.startFlag = TRUE; /* start immediately */
hClock = Clock_create(clock_swi, 1, &clockParams, &eb);
clock_swi function toggles a GPIO pin so I can observe the period of clock_swi on scope.
I expect to get clock_swi every 10us but I measured its period as 8.2us.
I followed the tips in
processors.wiki.ti.com/.../Processor_SDK_RTOS:_TI_RTOS_Tips_And_Tricks
and set correct ARM CPU value
BIOS.cpuFreq.lo = 600000000;
in my .cfg but still get period of 8.2us.
The Clock Module in RTOS Object View(ROV) shows
tickSource: ti.sysbios.knl.Clock.TickSource_TIMER
tickMode: ti.sysbios.knl.Clock.TickMode_PERIODIC
timerId: 0
swiPriority: 15
tickPeriod: 10
nSkip: 1
Q1: Do I miss any settings?
Q2: The timerId is 0 in ROV. Can you provide Timer Mapping Table for K2G processor to determine which timer corresponds to each Timer ID?
