Keil Logo

µVISION DEBUGGER: How to enable Vector Catch Support for Cortex-M Core

Information in this knowledgebase article applies to:

  • MDK-ARM All versions


Is there a way to stop my target system in a µVision debug session (ULINK2, ULINKpro, CMSIS-DAP, J-Link or others) without using breakpoints when an exception occurs?


Yes, a Cortex-M core can be halted when an exception occurs if the core debug register DEMCR is initialized properly. The following events are available:

VC_CORERESET Reset Vector Catch. Halt running system if Core reset occurs
VC_MMERR Debug trap on Memory Management faults
VC_NOCPERR Debug trap on Usage Fault access to Coprocessor which is not present
or marked as not present in CAR register
VC_CHKERR Debug trap on Usage Fault enabled checking errors
VC_STATERR Debug trap on Usage Fault state errors
VC_BUSERR Debug Trap on normal Bus error
VC_INTERR Debug Trap on interrupt/exception service errors. These are a subset of
other faults and catches before BUSERR or HARDERR
VC_HARDERR Debug trap on Hard Fault

Note: Cortex-M0 and Cortex-M0+ cores only have the bits VC_HARDERR and VC_CORERESET implemented. All other bits are reserved.

In order to initialize the DEMCR register at the beginning of a debug session and after every reset, the attached file VectorCatch.INI or VectorCatch_Buttons.INI can be used. Both can be opened in configuration wizard mode. The file VectorCatch_Buttons.INI additionally defines Toolbox buttons which make it easier to set/clear these bits while debugging.

This initialization file should be specified in the dialog Options for Target - Debug - Initialization File on the right hand side. It should look like this:



Request the files attached to this knowledgebase article.

Last Reviewed: Wednesday, April 18, 2018

Did this article provide the answer you needed?
Not Sure
  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.