Implicit DSP/BIOS Instrumentation
3-36
Table 3-4. STS Operations and Their Results
3) You may also set the properties of the corresponding STS object to filter
the values of this STS object on the host.
For example, you might want to watch the top of the system stack to see
whether the application is exceeding the allocated stack size. The top of the
system stack is initialized to 0xBEEF on the C5000 platform and to
0xC0FFEE on the C6000 platform when the program is loaded. If this value
ever changes, the application has either exceeded the allocated stack or
some error has caused the application to overwrite the application’s stack.
One way to watch for the allocated stack size being exceeded is to follow
these steps:
1) In the configuration, enable implicit instrumentation on any regularly
occurring HWI function. Change the monitor property for the HWI object
to Top of SW Stack with STS_delta(*addr) as the operation.
2) Set the prev property of the corresponding STS object to 0xBEEF on the
C5000 and C2800 platform or to 0xC0FFEE on the C6000 platform.
3) Load your program in Code Composer and use the Statistics Data tool to
view the STS object that monitors the stack pointer for this HWI function.
STS Operation Result
STS_add( *addr )
Stores maximum and total for the data value or register value
STS_delta( *addr ) Compares the data value or register value to the prev property of the STS object (or a
value set consistently with
STS_set) and stores the maximum and total differences.
STS_add( -*addr )
Negates the data value or register value and stores the maximum and total. As a
result, the value stored as the maximum is the negated minimum value. The total
and average are the negated total and average values.
STS_delta( -*addr )
Negates the data value or register value and compares the data value or register
value to the
prev property of the STS object (or a value set programmatically with
STS_set). Stores the maximum and total differences. As a result, the value stored
as the maximum is the negated minimum difference.
STS_add( |*addr| )
Takes the absolute value of the data value or register value and stores the maximum
and total. As a result, the value stored as the maximum is the largest negative or
positive value. The average is the average absolute value.
STS_delta( |*addr| ) Compares the absolute value of the register or data value to the prev property of the
STS object (or a value set programmatically with STS_set). Stores the maximum
and total differences. As a result, the value stored as the maximum is the largest
negative or positive difference and the average is the average variation from the
specified value.