Keil Logo


The pre-defined function OnStopAfterReset() is executed after a reset in µVision has been detected with the option "Stop after Reset" enabled in the Options for Target dialog.

It allows to add specific functionality that is required after reset to setup the debugger. For example, it allows to setup a BUS system for access to off-chip memory or peripherals. Create the function as explained on the page User Functions.


FUNC void OnStopAfterReset(void) {
  // TODO: Insert functionality to execute after any reset
  // has been detected with option "Stop after Reset" enabled


The function is only available for Cortex-M target debugging

Refer to OnResetExec for a similar function when a reset has been triggered.

  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.