MATLAB Link for Code Composer Studio Development Tools    
restart

Restore the program counter to the entry point for the current program

Syntax

Description

restart(cc,timeout) halts the processor immediately and resets the program counter (PC) to the program entry point for the loaded program. Use run to execute the program after you use restart. restart does not execute the program after resetting the PC. timeout allows you to specify how long restart waits for the processor to stop and return the PC to the program entry point. Specify timeout in seconds. After you use restart, the restart routine returns after resetting the PC or after timeout seconds elapse, whichever comes first. If the timeout period expires, restart returns a timeout error.

restart(cc) halts the processor immediately and resets the program counter (PC) to the program entry point for the loaded program. Use run to execute the program after you use restart. restart does not execute the program after resetting the PC. When you omit the timeout argument, restart uses the global default timeout period defined in cc to determine how long to wait for the processor to stop and the PC to be reset to the program entry point.

Examples

When you are developing algorithms for your target processor, restart becomes a particularly useful function. Rather than resetting the target after each algorithm test, use the restart function to return the program counter to the program entry point. Since restart restores your local variables to their initial settings, but does not reset the processor, you are ready to rerun your algorithm with new values. Also, in the case where your process gets lost or halts, restart is a quick way to restore your program.

See Also
halt, isrunning, run


  reshape run