EasyManuals Logo

Texas Instruments TMS320 User Manual

Texas Instruments TMS320
288 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #138 background imageLoading...
Page #138 background image
Software Interrupts
4-34
Figure 4-9. Using SWI_or to Post an SWI.
If the program execution requires that multiple occurrences of the same event
must take place before an SWI is posted, SWI_dec should be used to post
the SWI as shown in Figure 4-10. By configuring the SWI mailbox to be equal
to the number of occurrences of the event before the SWI should be posted
and calling SWI_dec every time the event occurs, the SWI is posted only after
its mailbox reaches 0; that is, after the event has occurred a number of times
equal to the mailbox value.
Program configuration
SWI object myswi Function myswiFxn()
Program
execution
· Calls
SWI_or(&myswi, 0x1)
· myswi is posted
· myswiFxn() is executed
· Calls
SWI_or(&myswi, 0x2)
· myswi is posted
· myswiFxn() is executed
Mailbox
value
Value returned by
SWI_getmbox
0
...
0 0
...
0
...
0 1
0
...
0 0
0
...
1 0
0
...
0 0
...
0
...
0 1
...
0
...
1 0
myswiFxn()
{
...
eventType = SWI_getmbox();
switch (eventType) {
case '0x1':
'run processing algorithm 1'
case '0x2':
'run processing algorithm 2'
case '0x4':
'run processing algorithm 3'
...
}
...
}

Table of Contents

Other manuals for Texas Instruments TMS320

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TMS320 and is the answer not in the manual?

Texas Instruments TMS320 Specifications

General IconGeneral
BrandTexas Instruments
ModelTMS320
CategoryComputer Hardware
LanguageEnglish

Related product manuals