__hwResetRunToBp
Syntax
__hwResetRunToBp(strategy,breakpoint_address,timeout)
Parameters
strategyFor information about supported reset strategies in the C-SPY I-jet driver, see ‑‑jet_standard_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 .
breakpoint_addressThe address of the breakpoint to execute to, specified as an integer value (symbols cannot be used).
timeoutA time out for the breakpoint, specified in milliseconds. If the breakpoint is not reached within the specified time, the core will be halted.
Return value
Value | Result |
|---|---|
| Successful. The approximate execution time in ms until the breakpoint is hit. |
| 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 CMSIS-DAP driver.
The C-SPY I-jet driver.
The C-SPY J-Link/J-Trace driver.
Description
Performs a hardware reset, sets a breakpoint at the specified address, executes to the breakpoint, and then removes it. The breakpoint address should be the start address of the downloaded image after it has been copied to RAM.
This macro is intended for running a boot loader that copies the application image from flash to RAM. The macro should be executed after the image has been downloaded to flash, but before the image is verified. The macro can be run in execUserFlashExit or execUserPreload.
Example
__hwResetRunToBp(0,0x400000,10000)
Resets the CPU with the reset strategy 0 and executes to the address 0x400000. If the breakpoint is not reached within 10 seconds, execution stops in accordance with the specified time out.
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.