This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Need a real time tick under SYS BIOS



Hello,

      I am evaluating a TMDS320C6670 processor using the EVM.  I have stumbled through and learned to create projects without SYS BIOS and with SYS BIOS. I have got some of the available examples to work.   I am now want to put a task to sleep and assume Task_sleep()  is the correct call.   Apparently the time slice function of the OS is not configured by default.   What steps are necessary to start the time slice function of the underlying OS ?   I see the timer functions but am still somewhat confused.  An explanation of what it takes to enable time sliceing would be greatly appreciated.

                                                                                                                                              Thanks

  • Chuck,

    Some operating systems require a system tick, and a time-slice mode, but SYS/BIOS does not.  In a nutshell: SYS/BIOS provides prioritized and fully preemptive schedulers, and a variety of timing services.  The timing services can actually be disabled, and scheduling can be based completely upon other application interrupts, like an interrupt raised by a peripheral when new data is ready and the CPU should wakeup, and a task should run to process the data.  When the processing is complete, the CPU can go back to sleep until new data is available at a peripheral.  

    Do you really want a time slice mode?  Or did you ask because you thought one was necessary, but disabled.  If you *want* time-slicing, I can post some example code that shows how to do that, using the available SYS/BIOS APIs…

    Scott

  • Scott,

           Thanks for you quick response.  I don't have to have time slicing but I would like to know what setup is necessary to get Task_sleep(XX) to work. 

                                                                                                                                                          Thanks

  • Chuck,

    OK.  For Task_sleep() you’ll basically need to have the Task and Clock modules enabled in the application.

    Task_sleep() is used in a few of the SYS/BIOS example programs.  You might start with the “minimal” example template.  This has a task that prints some output, sleeps for 10 ticks, prints some more, then the task exits.  Using the new project wizard, select the SYS/BIOS->Minimal Example, then build and run the program.  To see the text output from the program you can bring up the ROV tool (with Tools->RTOS Object View (ROV)), then click on the SysMin module, and its “OutputBuffer” tab to see the print statements.

    For an example with multiple tasks, semaphores, and Task_sleep(), look at the SYS/BIOS->Generic Examples->Task Mutex example.  The output from this example goes to the CCS console, versus having to look for it in ROV.

    You can modify either of these examples as a starting point to building your own applications…

    Scott