<< Chapter < Page Chapter >> Page >
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
  1. Name: TSK0 , priority: 1, function: _funTSK0 .
  2. 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
  1. Name: TSK0 , priority: 1, function: _funTSK0 .
  2. Name: TSK1 , priority: 1, function: _funTSK1 .
  3. 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
  1. Name: TSK0 , priority: 2, function: _funTSK0 .
  2. Name: TSK1 , priority: 1, function: _funTSK1 .
  3. 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
Wiseman Reply
how
basra
what is the difference between C and C++.
Yan Reply
what is software
Sami Reply
software is a instructions like programs
Shambhu
what is the difference between C and C++.
Yan
yes, how?
Hayder
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
Ntege Reply
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?
Mwami Reply
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
Mwaqas Reply
yes
usman
how disign photo
atul Reply
hlo
Navya
hi
Michael
yes
Subhan
Show the necessary steps with description in resource monitoring process (CPU,memory,disk and network)
samuel Reply
What is software engineering
Tafadzwa Reply
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
Alqa Reply
The following text is encoded in base 64. Ik5ldmVyIHRydXN0IGEgY29tcHV0ZXIgeW91IGNhbid0IHRocm93IG91dCBhIHdpbmRvdyIgLSBTdGV2ZSBXb3puaWFr Decode it, and paste the decoded text here
Julian Reply
what to do you mean
Vincent
hello
ALI
how are you ?
ALI
What is the command to list the contents of a directory in Unix and Unix-like operating systems
George Reply
how can i make my own software free of cost
Faizan Reply
like how
usman
hi
Hayder
The name of the author of our software engineering book is Ian Sommerville.
Doha Reply
what is software
Sampson Reply
the set of intruction given to the computer to perform a task
Noor
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




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.

Notification Switch

Would you like to follow the 'Ti dsp/bios lab' conversation and receive update notifications?

Ask