Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Import Macro Repair
Panel
bgColor#ffffff
titleQ

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

Panel
bgColor#ffffff
titleA
Code Block
languagecpp
// 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
Info
titleHilscher External Links!

http://infocenter.arm.com

https://interrupt.memfault.com/blog/cortex-m-fault-debug



 http://infocenter.arm.com

Panel
bgColor#ffffff
titleSee also...

Filter by label (Content by label)
showLabelsfalse
spaces@self
showSpacefalse
cqllabel = "faq" and space = currentSpace ( )
labelsfaq