<< 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

what is mutation
Janga Reply
what is a cell
Sifune Reply
how is urine form
Sifune
what is antagonism?
mahase Reply
classification of plants, gymnosperm features.
Linsy Reply
what is the features of gymnosperm
Linsy
how many types of solid did we have
Samuel Reply
what is an ionic bond
Samuel
What is Atoms
Daprince Reply
what is fallopian tube
Merolyn
what is bladder
Merolyn
what's bulbourethral gland
Eduek Reply
urine is formed in the nephron of the renal medulla in the kidney. It starts from filtration, then selective reabsorption and finally secretion
onuoha Reply
State the evolution relation and relevance between endoplasmic reticulum and cytoskeleton as it relates to cell.
Jeremiah
what is heart
Konadu Reply
how is urine formed in human
Konadu
how is urine formed in human
Rahma
what is the diference between a cavity and a canal
Pelagie Reply
what is the causative agent of malaria
Diamond
malaria is caused by an insect called mosquito.
Naomi
Malaria is cause by female anopheles mosquito
Isaac
Malaria is caused by plasmodium Female anopheles mosquitoe is d carrier
Olalekan
a canal is more needed in a root but a cavity is a bad effect
Commander
what are pathogens
Don Reply
In biology, a pathogen (Greek: πάθος pathos "suffering", "passion" and -γενής -genēs "producer of") in the oldest and broadest sense, is anything that can produce disease. A pathogen may also be referred to as an infectious agent, or simply a germ. The term pathogen came into use in the 1880s.[1][2
Zainab
A virus
Commander
Definition of respiration
Muhsin Reply
respiration is the process in which we breath in oxygen and breath out carbon dioxide
Achor
how are lungs work
Commander
where does digestion begins
Achiri Reply
in the mouth
EZEKIEL
what are the functions of follicle stimulating harmones?
Rashima Reply
stimulates the follicle to release the mature ovum into the oviduct
Davonte
what are the functions of Endocrine and pituitary gland
Chinaza
endocrine secrete hormone and regulate body process
Achor
while pituitary gland is an example of endocrine system and it's found in the Brain
Achor
what's biology?
Egbodo Reply
Biology is the study of living organisms, divided into many specialized field that cover their morphology, physiology,anatomy, behaviour,origin and distribution.
Lisah
biology is the study of life.
Alfreda
Biology is the study of how living organisms live and survive in a specific environment
Sifune
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