Embedded Systems Error Code
Systems & Devices
Embedded Systems

HARDFAULT | CPU fault exception

Industry
Systems & Devices
Canonical
/systems/embedded-systems/error-codes/hardfault/
Last Updated
Feb 27, 2026
Summary

A Cortex-M style fault handler was triggered due to an invalid memory or instruction condition.

Advertisement after-summary
Ad Space

What This Code Means

“HardFault” is a common embedded fault class on Cortex‑M systems. It indicates the CPU trapped on an unrecoverable exception, often due to invalid memory access, stack corruption, or an illegal instruction.

Where Users Usually See This Code

  • Device status screens or logs
  • During startup or initialization sequences
  • While interacting with sensors, buses, or storage
  • After firmware updates or configuration changes

Why This Code Appears

  • A safety check or assertion failed
  • The system restarted due to watchdog or power conditions
  • A bus, peripheral, or storage operation failed
  • A resource limit was reached (memory/stack)

What Typically Happens Next

  • The device may reboot or enter a fault state
  • A diagnostic message is logged
  • Service intervention may be required for field equipment

What This Code Is Not

  • It is not always user-repairable
  • It is not safe to perform electrical repairs based on guesses

Troubleshooting Checklist

  • Capture the full log output, including any stack trace or code
  • Confirm firmware version and recent configuration changes
  • Check power stability and environmental conditions
  • Isolate peripherals and buses if the fault indicates I/O
  • Use vendor diagnostics and service manuals for the exact model
  • Escalate when the fault is recurring or safety-critical

Notes And Edge Cases

Embedded error identifiers are frequently product-specific; the exact device documentation is critical.

Related Codes

8 links
Advertisement near-bottom
Ad Space
ErrorCodesIndex logo