MSTOP
Stop Task
Operands
none
This instruction does not have any operands
Opcode
LSW: 0000 0000 0000 0000
MSW: 0111 1111 1000 0000
Description
The MSTOP instruction must be placed to indicate the end of each task. In addition,
placing MSTOP in unused memory locations within the CLA program RAM can be useful
for debugging and preventing run away CLA code. When MSTOP enters the D2 phase of
the pipeline, the MIRUN flag for the task is cleared and the associated interrupt is flagged
in the PIE vector table.
There are three special cases that can occur when single-stepping a task such that the
MPC reaches the MSTOP instruction.
1. If you are single-stepping or halted in "task A" and "task B" comes in before the
MPC reaches the MSTOP, then "task B" will start if you continue to step through the
MSTOP instruction. Basically if "task B" is pending before the MPC reaches MSTOP
in "task A" then there is no issue in "task B" starting and no special action is required.
2. In this case you have single-stepped or halted in "task A" and the MPC has reached
the MSTOP with no tasks pending. If "task B" comes in at this point, it will be flagged
in the MIFR register but it may or may not start if you continue to single-step through
the MSTOP instruction of "task A". It depends on exactly when the new task comes in.
To reliably start "task B" perform a soft reset and reconfigure the MIER bits. Once this
is done, you can start single-stepping "task B".
3. Case 2 can be handled slightly differently if there is control over when "task B" comes
in (for example using the IACK instruction to start the task). In this case you have
single-stepped or halted in "task A" and the MPC has reached the MSTOP with no
tasks pending. Before forcing "task B", run free to force the CLA out of the debug
state. Once this is done you can force "task B" and continue debugging.
Restrictions
The MSTOP instruction cannot be placed 3 instructions before or after a
,
Flags
This instruction does not modify flags in the MSTF register.
Flag
TF
ZF
NF
LUF
LVF
Modified
No
No
No
No
No
Control Law Accelerator (CLA)
692
TMS320x2806x Microcontrollers
SPRUH18I – JANUARY 2011 – REVISED JUNE 2022
Copyright © 2022 Texas Instruments Incorporated
Summary of Contents for TMS320 2806 Series
Page 2: ......