-
Home
- Ti dsp/bios lab
- Lab 2
- Tsk sem lab
The module is a lab assignment to better understand the TI DSP/BIOS TSK and SEM modules.
Introduction
This lab module will help you become familiar with the TI DSP/BIOS TSK module and SEM module.
Reading
- SPRU423 TMS320 DSP/BIOS Users Guide: Read the sections on Semaphores and Tasks.
Lab module prerequisites
None
Laboratory
Part 1
- In this part we will create two tasks that will have the same priority and will run independent of each other.
- Follow the procedure in
Code Composer Studio v4 DSP/BIOS Project to create a new CCS DSP/BIOS project. Name the project
tsklab
. Your project should have a DSP/BIOS configuration file named
tsklab.tcf
.
- Create a LOG object by right clicking on Instrumentation->LOG and selecting Insert LOG. Change the name to
trace
. Set its properties to have a length of 128 and be a fixed buffer.
- Create two TSKs with the following properties
- Name:
TSK0
, priority: 1, function:
_funTSK0
.
- Name:
TSK1
, priority: 1, function:
_funTSK1
.
- Create a
main.c
file and include a
main
function that does nothing.
- In the
main.c
file make functions for your TSKs,
funTSK0
and
funTSK1
. Each function should print to the
trace
LOG object once at the beginning of the function to indicate that the particular TSK is starting and once at the end of the function to indicate that the particular TSK is ending.
- Add code to each task that loops 5 times and prints to
trace
the task number and the loop number each time through the loop. It should look something like:
TSK0 Number 0
TSK0 Number 1...
- The basic structure of
main.c
should be:
#include<std.h>#include "tsklabcfg.h"void main()
{}void funTSK0()
{/* code here */
}void funTSK1(){
/* code here */}
- Start the debug session.
- Open the log view by selecting
Tools->RTA->Printf Logs .
- Run the program and record the results.
Part 2
- In this part we will change the tasks so that they yield to each other within their loops.
- Have in your system two TSKs with the following properties
- Name:
TSK0
, priority: 1, function:
_funTSK0
.
- Name:
TSK1
, priority: 1, function:
_funTSK1
.
- Each yields to the other in their loop.
- Copy the
main.c
file from above to a new file
main2.c
. Exclude the
main.c
from your project build.
- Change the code so that the two tasks yield to each other within the loop. Put a print statement before the yield and one after the yield so you will know when the function has completed the loop. Do this for subsequent parts of this lab also.
- Start the debug session.
- Open the log view by selecting
Tools->RTA->Printf Logs .
- Run the program and record the results.
Part 3
- In this part we will change the tasks so that one is a higher priority than the other. They yield to each other in their loops.
- Have in your system two TSKs with the following properties
- Name:
TSK0
, priority: 2, function:
_funTSK0
.
- Name:
TSK1
, priority: 1, function:
_funTSK1
.
- Each yields to the other in their loop.
- This part will still be executing
main2.c
.
- Set
TSK0
to a higher priority than the other.
- Start the debug session.
- Open the log view by selecting
Tools->RTA->Printf Logs .
- Run the program and record the results.
- Does the execution appear different from part 2?
Questions & Answers
how to create a software using Android phone
what is the difference between C and C++.
software is a instructions like programs
Shambhu
what is the difference between C and C++.
Yan
what is software engineering
Ahmad
software engineering is a the branch of computer science deals with the design,development, testing and maintenance of software applications.
Hayder
who is best bw software engineering and cyber security
Ahmad
Both software engineering and cybersecurity offer exciting career prospects, but your choice ultimately depends on your interests and skills. If you enjoy problem-solving, programming, and designing software syste
Hayder
what's software processes
I haven't started reading yet. by device (hardware) or for improving design Lol? Here. Requirement, Design, Implementation, Verification, Maintenance.
Vernon
I can give you a more valid answer by 5:00 By the way gm.
Vernon
it is all about designing,developing, testing, implementing and maintaining of software systems.
Ehenew
hello assalamualaikum
Sami
My name M Sami I m 2nd year student
Sami
what is the specific IDE for flutter programs?
jegudgdtgd my Name my Name is M and I have been talking about iey my papa john's university of washington post I tagged I will be in
Show the necessary steps with description in resource monitoring process (CPU,memory,disk and network)
What is software engineering
Software engineering is a branch of computer science directed to writing programs to develop Softwares that can drive or enable the functionality of some hardwares like phone , automobile and others
kelvin
if any requirement engineer is gathering requirements from client and after getting he/she Analyze them this process is called
The following text is encoded in base 64.
Ik5ldmVyIHRydXN0IGEgY29tcHV0ZXIgeW91IGNhbid0IHRocm93IG91dCBhIHdpbmRvdyIgLSBTdGV2ZSBXb3puaWFr
Decode it, and paste the decoded text here
what to do you mean
Vincent
What is the command to list the contents of a directory in Unix and Unix-like operating systems
how can i make my own software free of cost
The name of the author of our software engineering book is Ian Sommerville.
the set of intruction given to the computer to perform a task
Noor
Got questions? Join the online conversation and get instant answers!
Source:
OpenStax, Ti dsp/bios lab. OpenStax CNX. Sep 03, 2013 Download for free at http://cnx.org/content/col11265/1.8
Google Play and the Google Play logo are trademarks of Google Inc.