What is the execution program status register?

What is the execution program status register?

Execution Program Status Register The EPSR contains the Thumb state bit, and the execution state bits for either the: If-Then (IT) instruction. Interruptible-Continuable Instruction (ICI) field for an interrupted load multiple or store multiple instruction.

What are hard page faults in memory?

Page faults are generated when an application tries to use memory that is part of its working set, but can’t find it. Page faults can be either hard or soft: Hard page faults occur when the page is found in the page file on the hard disk. Soft page faults happen when the page is found somewhere else in memory.

What are hard faults on memory?

A hard fault happens when the address in memory of part of a program is no longer in main memory, but has been instead swapped out to the paging file, making the system go looking for it on the hard disk. When this happens a lot, it causes slowdowns and increased hard disk activity.

How to find the cause of a hard fault?

Add a reply… first of all, you should find the cause of the hard fault. To do so, the contents of the stack frame of the hard fault handler would help you. The following is the hard fault handler code from the freescale Kinetis sample codes (sorry I don’t have STM environment).

What is the stack frame of a fault handler?

The stack frame of the fault handler contains the state of the ARM Cortex-M registers at the time that the fault occurred. The code below shows how to read the register values from the stack into C variables.

How to write a ” hard fault handler ” in C?

Then open Memory window and and ump MSP or PSP according to LR. All of that can be done from the debugger at the hard-fault interrupt breakpoint. I know a C code is better, but, writing that code is vital only if you plan to “have” lots of hard-faults 🙂

How to diagnose hard faults on ARM Cortex-M?

The stack frame of the fault handler contains the state of the ARM Cortex-M registers at the time that the fault occurred. The code below shows how to read the register values from the stack into C variables. Once this is done, the values of the variables can be inspected in a debugger just as an other variable.