__hwResetWithStrategy
Syntax
__hwResetWithStrategy(halt_delay,strategy)
Parameters
halt_delayThe delay, in milliseconds, between the end of the reset pulse and the halt of the CPU. Use
0(zero) to make the CPU halt immediately after reset—only whenstrategyis set to0.strategyThe C-SPY I-jet driver only supports strategy 2 (hardware reset). For information about supported reset strategies in the C-SPY J-Link driver, see the J-Link/J-Trace documentation available at www.segger.com.
Return value
Result | Value |
|---|---|
Successful. The actual delay in milliseconds, as implemented by the emulator |
|
Successful. The delay feature is not supported by the emulator |
|
Unsuccessful. Hardware reset is not supported by the emulator |
|
Unsuccessful. The reset strategy is not supported by the emulator |
|
For use with
The C-SPY I-jet driver.
The C-SPY J-Link/J-Trace driver.
This macro also exists in other C-SPY hardware drivers, but has no effect.
Description
Performs a hardware reset and a halt with delay of the target CPU.
Example
__hwResetWithStrategy(0,1)
Resets the CPU and halts it using a breakpoint at memory address zero.
Note
User-defined millisecond timeouts and delays are generated using the host operating system clock ticks. Because the host operating system is not a real-time OS, the actual delay or timeout will vary each time with approximately 5–20 ms.