Other Parts Discussed in Thread: SYSBIOS
Tool/software: TI-RTOS
Hi,
I am trying to setup a clock handle that will post a software interrupt every 10ms.
BIOS_getCpuFreq() gives me the DSP frequency = 600MHz.
I setup the clock with the given parameters :
Clock_Params_init(&my_clk_params);
my_clk_params.startFlag = TRUE;
my_clk_params.period = 600000; //num_ticks_to_wait = 600000 600M ticks per second, hence 600000 ticks for 10ms delay?
my_clk_params.arg = NULL;
my_clk_handle = Clock_create(my_clock_handler, 100, &my_clk_params, NULL); // timeout value 100 not used as startFlag = TRUE ?
I notice that the clock_handler fires off approximately every 7 minutes, instead of the expected 10ms.
I configure the SWI as follows :
Swi_Params_init(&my_swi_params);
my_swi_params.arg0 = 0;
my_swi_params.arg1 = 0;
my_swi_params.priority = 1;
my_swi_params.trigger = 1;
my_swi_handle = Swi_create(my_swi_handler, &my_swi_params, NULL);
Void my_clock_handler(UArg arg0)
{
Swi_post(my_swi_handle);
}
Void my_swi_handler(UArg arg0, UArg arg1)
{
sem_post(&my_semaphore);
}
Did i miss anything while configuring the clock instance or software interrupt ?