Questions tagged [hard-fault]
20 questions
7
votes
3 answers
Finding the source of a Hard Fault using extended HardFault_Handler
I have been hitting some hard-faults on the firmware I have created with FreeRTOS on a SAMD21 (ARM Cortex-M0) MCU.
So I took a further action to find out the cause and eventually bumped into this article on Code_Red pointing out the snippet…

Mehrad
- 656
- 2
- 7
- 20
6
votes
2 answers
Mysterious hard-fault when I step over
This question was rewritten to remove several updates and improve clarity.
I have a Cortex M3 based (and rather obscure) MCU. I have a rather big project, written in C++, in Keil MDK5 with armcc compiler.
I have this function:
bool…

Amomum
- 675
- 7
- 14
3
votes
0 answers
Hard fault on only one of two identical STM32F405 boards
So I've made two prototypes of a new custom board with a STM32F405RG microcontroller at heart and while one of them works totally fine, after a few seconds or more I'm getting a hard fault on the second one.
To investigate the origin of the hard…

adam
- 31
- 1
2
votes
1 answer
HardFault and BFAR
I am using stm32f4.
I have a hardfault error at sometimes, when I write new code in to the flash.
So I check the Fault Registers like in below:
SerialPrint("Fault: %08x %08x %08x\n",SCB->HFSR, SCB->CFSR, SCB->BFAR);
Output results:
SCB->HFSR =…

gogogo
- 283
- 1
- 12
2
votes
3 answers
Why the MCU crashed?
KEY_EN connect to MCU as push input.
With 100 nF capacitor, the MCU will crash after some pushes.
Without 100 nF cpacitor, everything is OK.
The MCU is Nordic 52832
After inserting the battery, long press SW1 3s POW_KEY to pull down Q1 and turn…

haiwuxing
- 218
- 1
- 8
2
votes
1 answer
How are the bitflip and row hammering effects taken care of by micro controllers in critical systems?
Bitflips/random hardware faults and row hammering are some of the things which could damage the memory. Do the current breed of latest microcontrollers, used in embedded systems, have any mechanism to detect these?
I’m not aware of how this is…

Rookie91
- 2,108
- 4
- 29
- 46
2
votes
0 answers
Bus Fault Handler when writing to a memory provided by a linker script
I have to work with code written by someone else for the Cortex M3-based board. I know that this code is supposed to work and it used to pass its integration test: the code is flashed to the board using openocd and then a Python script asserts that…

Stanislav Pankevich
- 121
- 3
2
votes
3 answers
How to debug this I2C hard fault?
I am using an STM32F103C8T6, STM32CubeIDE with HAL.
During accessing an LCD (1602), with I2C, I get a hard fault.
I try to debug it, but somehow I don't see the stack. See the following screenshot:
The breakpoint happens inside the…

Michel Keijzers
- 13,867
- 18
- 69
- 139
1
vote
2 answers
HardFault with FreeRTOS at STM32 - New Project
Is this a bug. First I created a new project and enabled FreeRTOS and then I set the Time Base Source to TIM3. Then I got hard fault.
STM32CubeMX IDE 1.4.0
Board Nucleo STM32 F401RE
I can upload the project as well as Test.zip. Available for 30…

euraad
- 1,025
- 11
- 30
1
vote
0 answers
HardFault_Handler on STM32F407ZET6
I am currently facing some problems with STM32F4, the process "hangs" and I am not able to understand at what point it "locked". When this happened, I collected the following values for the following variables (I created the variable stepError to…

Eduardo Cardoso
- 583
- 1
- 8
- 29
1
vote
0 answers
Can Hardfault Exception be triggered by hardware?
I have an Cortex-M7 project that sometimes goes in the Hardfault exception interrupt, sometimes not. With the same code. When it happens it append all the time. My system is made of two board connected together, one has the M7 MCU. When I disconnect…

Antoine
- 195
- 1
- 6
0
votes
1 answer
Arm CM4 (Psoc62) generates Hardfault when reading peripheral at 0x4047...?
I have a project with an infineon/cypress psoc62 (CY8C624AAZI-S2D44). It is a dual core arm MCU (CM4 is Arm7 and CM0p is Arm6) . I'm using the CM4 core. The CM0p core releases the CM4 from reset and put itself to sleep. The MCU has two SD(Secure…

Rodo
- 875
- 4
- 15
0
votes
0 answers
STM32 Cube IDE: Program for STM32F030FPx crashes
I am programming my STM32F030FPx TSSOP20 over SWD. I am simply trying to blink an LED by using the HAL GPIO library and the system timer to setup a delay. When I begin debug and let the program run, it crashes every time.
At first, I thought it was…

Jack Frye
- 145
- 3
0
votes
1 answer
TM4C123GXL Tiva launchpad: Hardware Fault when debugging in Keil Microvision
I got a weird problem last night. Here is a simple program that uses pin PA7 to drive a LED:
#include
#include
#include "driverlib/sysctl.h"
#include "inc/tm4c123gh6pm.h"
void PortA_Init(void){
volatile unsigned long…

Nicholas Humphrey
- 109
- 5
0
votes
2 answers
What does this mean about MOSFET load capacitance?
I was reading a paper regarding fault detection in combinational logic circuits and read something that I do not understand. It is about the downsizing of transistors making them more prone to hard faults.
It says: "Generally, in new generation…

David777
- 1,548
- 12
- 29