AnsweredAssumed Answered

HardFault

Question asked by Martin Novak on Apr 27, 2017
Latest reply on Apr 28, 2017 by Brendon Slade

Hi all,

I have the following problem:

 

My Main starts like this

    SystemCoreClockUpdate();
    Board_Init();

When I start the program directly with F8 "Run" (or turn on power) it jumps directly to "cr_startup_lpc5411x.cpp" to here

__attribute__ ((section(".after_vectors")))
void HardFault_Handler(void)
{ while(1) {}
}

When I do F6 "Step over" over the first 2 lines in main and THEN do  "Run", it runs fine

I have found out

 

Name : ipsr
    Hex:3  (HardFault)
    Decimal:3  (HardFault)
    Octal:3  (HardFault)
    Binary:3  (HardFault)
    Default:3  (HardFault)

Faults     = InvState
Fault PC   = 0x00000000
           = g_pfnVectors in section .text
           = No line number information available.

Fault status registers:
IPSR       = 0x1000003: 3  (HardFault)
CFSR       = 00020000 (Configurable Fault Status Register)
HFSR       = 40000000 (Hard Fault Status Register)
DFSR       = 00000000 (Debug Fault Status Register)
MMAR       = e000edf8 [INVALID] (MemManage Fault Address Register)
BFAR       = e000edf8 [INVALID] (Bus Fault Address Register)
AFSR       = 00000000 (Auxiliary Fault Status Register)

But I don´t have any clue what that means.

I run on my own board. On the devkit the program runs fine.

Outcomes