Skip to end of banner
Go to start of banner

Fault Exceptions

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

Q

How can I force a ARM Cortex-M4 fault exception like UsageFault or BusFault for Software Verification?

A
// usage fault nopc
asm volatile("MCR p12, 0, R0, c15, c0, 0;\n");


// busfault - alignment
uint32_t* pulForceFault = (uint32_t*) 1;
*pulForceFault=0;

UsageFaults, BusFaults, etc. may be escalated to a HardFault, if the respective fault handler is not enabled.

The HardFault Status Register HFSR or the Configurable Fault Status Register - CFSR (combined Usage-, Bus- and Memory Managment Fault Status Register) - may be evaluated to get further information.

Refer to respective documentation from ARM, like the "Cortex ™ -M4 Devices Generic User Guide" and the "ARM ® v7-M Architecture Reference Manual".



 http://infocenter.arm.com

  • No labels