Other Parts Discussed in Thread: SYSBIOS
Tool/software: Code Composer Studio
Is there a canned example to set CPU load at some percentage which is benchmarked by TI for the Tools->RTOS Analyzer -> Load Analysis -> CPU Load / Task Load?
I wrote a code that has a main thread that does essentially something like this :
while(1)
{
/* Turn on the LED for work */
GPIO_write(Board_GPIO_LED0, Board_GPIO_LED_ON);
// find out the starting time
uint32_t start_time = Clock_getTicks();
while (Clock_getTicks() - start_time <=TEST_INTERVAL){
; // waste CPU cycles
}
/* Turn off the LED for sleep*/
GPIO_write(Board_GPIO_LED0, Board_GPIO_LED_OFF);
// now make the thread sleep
Task_sleep(TEST_INTERVAL);
}
This essentially makes the thread do some busy work for half the time, and sleep thus freeing up the CPU for half the time. I am able to see the CPU utilization reflect 50% usage, and it changes accordingly when I change the ratio of sleeping time to busy work.
Is there a pre-canned example that does something like this but benchmarked by TI? I see an example called Benchtool in rtos->sysbios, additionally, is there a description of all the simplelink projects and what they are supposed to do? I could only find descriptions for the ones described in the LaunchXL launchpad.