Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob

Fault Handlers for Arm Cortex-M – KBA231424

lock attach
Attachments are accessible only for community members.

Fault Handlers for Arm Cortex-M – KBA231424

ChaitanyaV_61
Employee
Employee
50 questions asked 25 likes received 25 sign-ins

Version: **

Translation - Japanese: Arm Cortex-Mのフォルトハンドラ - KBA231424 - Community Translated (JA)

Question:
What are the types of processor faults in Arm® Cortex®-M? How do you generate and identify the processor faults?

Answer:
There are four types of processor faults in Arm Cortex-M. These are:

  • HardFault
  • MemManage
  • BusFault
  • UsageFault

Processor faults can be identified by reading the Fault Status registers and by checking the bit names for the specified fault. The attached zipped folder (KBA_faults_handler.zip) contains the application file that generates the faults and the fault handler file. The fault handler file identifies the fault and displays the relevant information on the terminal.

Note:

  • The handlers for the BusFault, MemManage Fault, and UsageFault must be enabled in the System Handler Control and State Register (SHCSR), otherwise HardFault handler will take care of the generated faults.
  • This bit enabling is handled in configure_fault_register function in the application code.
  • The handler file (platform_unhandled_isr.c) in the zipped folder is to be integrated in Cortex-M based MCU folders (STM32F4xx, STM32F2xx) to handle the faults.
Attachments
0 Likes
225 Views
Contributors