cancel
Showing results for 
Search instead for 
Did you mean: 

Hard Fault exception STMF4

sami
Associate II
Posted on February 23, 2013 at 13:50

Hello ;

I am getting Hard Fault exception  when excutting the function

arm_cfft_radix4_f32(&S,testInput );

I set the FPU on  I tried to increase the heap and stack too but I could not solve it ;

could you help me to fix this please?

Regards

Esat

#fpu-memmanage-hard-fault
10 REPLIES 10
arnaljl2
Associate II
Posted on March 15, 2013 at 01:09

Okay, fast self-answering of the problem Camille (my collegue) encountered.

You want to set full access to the coprocessor, by setting CP11[0:1] and CP10[0:10] both to 0b11 in the core's coprocessor acces control register (CPACR), and doing it early in the SystemInit() or whatever method you call upon reset.

Fact is, many of you laddos knows it is done there, looking like this :

#if

(__FPU_PRESENT == 1) && (__FPU_USED == 1)

        SCB->CPACR |= ((

3UL

<<

10

*

2

)|(

3UL

<<

11

*

2

)); 

/* set CP10 and CP11 Full Access */

#endif

Poor Camille started his project from scratch... too bad.  °w^