SPRUHJ0C April 2013 – October 2021 TMS320F28068M , TMS320F28069-Q1 , TMS320F28069M , TMS320F28069M-Q1
Figure 7-1 illustrates the options available to the designer to manage the real-time scheduling of each of the major software functions.
Table 7-1 and Table 7-2 indicates CPU cycle utilization of SpinTAC components running out of ROM on the 28069M and 28068M devices. Note that this data is for the SpinTAC components only, and does include InstaSPIN-FOC. For InstaSPIN-FOC CPU utilization and memory footprints, see the TMS320F2806xF InstaSPIN-FOC™ Software Technical Reference Manual.
The Speed Count is used to calculate the SpinTAC sample time. SpinTAC is called from main ISR but can be decimated using the same decimation rate used to run the speed controller. The correct decimation rate can be calculated by multiplying the USER_NUM_ISR_TICKS_PER_CTRL_TICK by the USER_NUM_CTRL_TICKS_PER_SPEED_TICK.
Function Name(1)(2) | CPU Cycles(3)(4) | Executed From | |||||
---|---|---|---|---|---|---|---|
Min | Avg | Max | ROM | RAM | FLASH | ||
STVELCTL_run (Velocity Control) | |||||||
RES = 1, ENB = 0 | 158 | 158 | 158 | ✓ | ✓ | × | |
RES = 0, ENB = 1 | 573 | 573 | 573 | ||||
First call after ENB = 1 | 1010 | 1010 | 1010 | ||||
Change Bandwidth parameter | 786 | 786 | 786 | ||||
Change Inertia parameter | 786 | 786 | 786 | ||||
RES = 1, ENB = 1 | 165 | 165 | 165 | ||||
STVELMOVE_run (Velocity Move) | |||||||
RES = 1, ENB = 0 | 202 | 202 | 202 | ✓ | ✓ | × | |
stcurve | RES = 0, ENB = 1 | 713 | 743 | 1444 | |||
scurve | RES = 0, ENB = 1 | 676 | 709 | 1409 | |||
trap | RES = 0, ENB = 1 | 547 | 620 | 1134 | |||
RES = 1, ENB = 1 | 191 | 191 | 191 | ||||
STVELPLAN_run (Velocity Plan) | |||||||
RES = 1, ENB = 0 | 159 | 159 | 159 | ✓ | ✓ | × | |
RES = 0, ENB = 1 | 169 | 169 | 169 | ||||
First call after ENB = 1 | 326 | 326 | 326 | ||||
STAY FSM State | 188 | 188 | 188 | ||||
Condition FSM State Calculation must be done for each State |
324 (fixed) + 290 * Number of Transitions + 68 * Number of EXIT Actions |
||||||
Transition FSM State Calculation must be done for each State |
226 (fixed) + 63 * Number of ENTER Actions |
||||||
STVELPLAN_runTick (ISR function) | 58 | 79.7 | 80 | ||||
STVELID_run (Velocity Identify) | |||||||
RES = 1, ENB = 0 | 142 | 142 | 142 | ✓ | ✓ | × | |
RES = 0, ENB = 1 | 217 | 239 | 667 | ||||
First call after ENB = 1 | 1083 | 1083 | 1083 | ||||
RES = 1, ENB = 1 | 149 | 149 | 149 | ||||
STPOSCOV_run (Position Converter) | |||||||
RES = 1, ENB = 0 | 110 | 110 | 110 | ✓ | ✓ | × | |
RES = 0, ENB = 1 | 322 | 331 | 333 | ||||
First call after ENB = 1 | 985 | 985 | 985 | ||||
RES = 1, ENB = 1 | 118 | 118 | 118 | ||||
STPOSCTL_run (Position Control) | |||||||
RES = 0, ENB =0 | 176 | 176 | 176 | ✓ | ✓ | × | |
RES = 0, ENB = 1 | 1134 | 1139 | 1154 | ||||
First call after ENB = 1 | 1927 | 1927 | 1927 | ||||
Change Bandwidth parameter | 1632 | 1632 | 1632 | ||||
Change Inertia parameter | 1632 | 1632 | 1632 | ||||
RES = 1, ENB = 1 | 185 | 185 | 185 | ||||
STPOSMOVE_run (Position Move) | |||||||
RES = 0, ENB = 0 | 406 | 406 | 406 | ✓ | ✓ | × | |
stcurve | RES = 0, ENB = 1 | 611 | 1400 | 2729 | |||
Velocity Controlled Profile | 1272 | 1409 | 2475 | ||||
scurve | RES = 0, ENB = 1 | 611 | 1345 | 2560 | |||
Velocity Controlled Profile | 1219 | 1367 | 2431 | ||||
trap | RES = 0, ENB = 1 | 611 | 1274 | 2498 | |||
Velocity Controlled Profile | 1673 | 1850 | 2029 | ||||
RES = 1, ENB = 1 | 381 | 381 | 381 | ||||
STPOSPLAN_run (Position Plan) | |||||||
RES = 1, ENB = 0 | 173 | 173 | 173 | ✓ | ✓ | × | |
RES = 0, ENB = 1 | 201 | 201 | 201 | ||||
First call after ENB = 1 | 363 | 363 | 363 | ||||
STAY FSM State | 201 | 201 | 201 | ||||
Condition FSM State Calculation must be done for each State |
388 (fixed) + 296 * Number of Transitions + 68 * Number of EXIT Actions |
||||||
Transition FSM State Calculation must be done for each State |
240 (fixed) + 63 * Number of ENTER Actions |
||||||
STPOSPLAN_runTick (ISR function) | 58 | 80 | 80 |
Function Name(1)(2) | CPU Cycles(3)(4) | Executed From | |||||
---|---|---|---|---|---|---|---|
Min | Avg | Max | ROM | RAM | FLASH | ||
STVELCTL_run (Velocity Control) | |||||||
RES = 1, ENB = 0 | 189 | 189 | 189 | ✓ | × | ✓ | |
RES = 0, ENB = 1 | 614 | 614 | 614 | ||||
First call after ENB = 1 | 1077 | 1077 | 1077 | ||||
Change Bandwidth | 842 | 842 | 842 | ||||
Change Inertia parameter | 842 | 842 | 842 | ||||
RES = 1, ENB = 1 | 347 | 347 | 347 | ||||
STVELMOVE_run (Velocity Move) | |||||||
RES = 1, ENB = 0 | 220 | 220 | 220 | ✓ | × | ✓ | |
stcurve | RES = 0, ENB = 1 | 724 | 759 | 1468 | |||
scurve | RES = 0, ENB = 1 | 687 | 724 | 1435 | |||
trap | RES = 0, ENB = 1 | 561 | 636 | 1167 | |||
RES = 1, ENB = 1 | 494 | 494 | 494 | ||||
STVELPLAN_run (Velocity Plan) | |||||||
RES = 1, ENB = 0 | 183 | 183 | 183 | ✓ | × | ✓ | |
RES = 0, ENB = 1 | 238 | 238 | 238 | ||||
First call after ENB = 1 | 333 | 333 | 333 | ||||
STAY FSM State | 238 | 238 | 238 | ||||
Transiation FSM State Calculation must be done for each State |
436 (fixed) + 320 * Number of Transitions + 388 * Number of EXIT Actions |
||||||
Condition FSM State Calculation must be done for each State |
283 (fixed) + 438 * Number of ENTER Actions |
||||||
STVELPLAN_runTick (ISR function) | 76 | 100 | 100 | ||||
STVELID_run (Velocity Identify) | |||||||
RES = 1, ENB = 0 | 198 | 198 | 198 | ✓ | × | ✓ | |
RES = 0, ENB = 1 | 256 | 278 | 723 | ||||
First call after ENB = 1 | 1196 | 1196 | 1196 | ||||
RES = 1, ENB = 1 | 292 | 292 | 292 | ||||
STPOSCOV_run (Position Converter) | |||||||
RES = 1, ENB = 0 | 127 | 127 | 127 | ✓ | × | ✓ | |
RES = 0, ENB = 1 | 391 | 398 | 400 | ||||
First call after ENB = 1 | 1209 | 1209 | 1209 | ||||
RES = 1, ENB = 1 | 140 | 140 | 140 | ||||
STPOSCTL_run (Position Control) | |||||||
RES = 0, ENB =0 | 201 | 201 | 201 | ✓ | × | ✓ | |
RES = 0, ENB = 1 | 1207 | 1212 | 1225 | ||||
First call after ENB = 1 | 2043 | 2043 | 2043 | ||||
Change Bandwidth parameter | 1729 | 1729 | 1729 | ||||
Change Inertia parameter | 1729 | 1729 | 1729 | ||||
RES = 1, ENB = 1 | 449 | 449 | 449 | ||||
STPOSMOVE_run (Position Move) | |||||||
RES = 0, ENB = 0 | 520 | 520 | 520 | ✓ | × | ✓ | |
stcurve | RES = 0, ENB = 1 | 790 | 1611 | 3630 | |||
Velocity Controlled Profile | 1467 | 1588 | 2778 | ||||
scurve | RES = 0, ENB = 1 | 790 | 1564 | 3205 | |||
Velocity Controlled Profile | 1415 | 1551 | 2734 | ||||
trap | RES = 0, ENB = 1 | 790 | 1501 | 3130 | |||
Velocity Controlled Profile | 1540 | 1903 | 2438 | ||||
RES = 1, ENB = 1 | 996 | 996 | 996 | ||||
STPOSPLAN_run (Position Plan) | |||||||
RES = 1, ENB = 0 | 202 | 202 | 20 | ✓ | × | ✓ | |
RES = 0, ENB = 1 | 255 | 255 | 255 | ||||
First call after ENB = 1 | 373 | 373 | 373 | ||||
STAY FSM State | 255 | 255 | 255 | ||||
Condition FSM State Calculation must be done for each State |
501 (fixed) + 323 * Number of Transitions + 382 * Number of EXIT Actions |
||||||
Transition FSM State Calculation must be done for each State |
301 (fixed) + 432 * Number of ENTER Actions |
||||||
STPOSPLAN_runTick (ISR function) | 86 | 115 | 115 |