Skip to main content

IAR Embedded Workbench for Arm 9.70.x

__hwResetWithStrategy

In this section:
Syntax
__hwResetWithStrategy(halt_delay, strategy)
Parameters
halt_delay

The 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 when strategy is set to 0.

strategy

The 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

>=0

Successful. The delay feature is not supported by the emulator

-1

Unsuccessful. Hardware reset is not supported by the emulator

-2

Unsuccessful. The reset strategy is not supported by the emulator

-3

Table 41. __hwResetWithStrategy return values 


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.