halt - Terminate execution of process running on target

Syntax

halt(cc,timeout)
halt(cc)

Description

halt(cc,timeout) immediately stops program execution by the processor. After the processor stops, halt returns to the host. timeout defines, in seconds, how long the host waits for the target processor to stop running. To resume processing after you halt the processor, use run. Also, the read(cc,'pc') function can determine the memory address where the processor stopped after you use halt.

timeout defines the maximum time the routine waits for the processor to stop. If the processor does not stop within the specified time-out period, the routine returns with a time-out error.

halt(cc) immediately stops program execution by the processor. After the processor stops, halt returns to the host. In this syntax, the time-out period defaults to the global time-out period specified in cc. Use get(cc) to determine the global time-out period.

Using halt with Multiprocessor Boards

When you issue a halt from the command line, it applies to every processor that the cc object represents. Thus halt stops every running processor for the object.

Examples

Use one of the provided demonstration programs to show how halt works. From the CCS IDE demonstration programs, load and run volume.out.

At the MATLAB® software prompt create a link to CCS IDE

cc = ticcs

Check whether the program volume.out is running on the processor.

isrunning(cc)

ans =

     1

cc.isrunning % Alternate syntax for checking the run status.

ans =

     1
halt(cc) % Stop the running application on the processor.
isrunning(cc)

ans =

     0

Issuing the halt stopped the process on the target. Checking in CCS IDE shows that the process has stopped.

See Also

ticcs, isrunning, run

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS
 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS