Disable the FPU Unit on XMC4500 (Relax-Kit)

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

cross mob
Not applicable
I am trying to compare the speed of the arm_cfft_radix4_init_f32() function with and without FPU unit. The CMSIS DSP Lib is initialised and working well, but the Coprocessor Access Control Register (CPACR@0xE000ED88) seems to have always the same value CP11=0b11 and CP12=0b11.
According to the XMC4000 Family Data Sheet these states mean that the FPU is enabled, how can i disable it in DAVE?
If the FPU is disabled manually (try 4) the code stops working. How I can I set the complier not to use the FPU unit?

Tried the following:

Try 1:
don't define __FPU_PRESENT

Try 2:
change #define __FPU_PRESENT 1 to 0 in XMC4500.h and define #define __FPU_USED 0

Try 3:
Project Properties->C/C++ Build->Settings->ARM-GCC C Complier->Preprocessor->Defined symbols(-D):

added:
__FPU_USED 0
__FPU_PRESENT 0


Result is in all the trials above that the FPU remains turned on.
1240.attach

Try 4:
If the registers are cleaned manually the FPU is really turned on, but the code is not running anymore.
In the main fuction:
SCB->CPACR &= ~((3UL << 10*2) | /* clear CP10 Full Access */
(3UL << 11*2) );

1241.attach
0 Likes
1 Reply
Not applicable
Hello balazs

Did you find a solution?
I'm also interested in deactivation of the FPU on XMC4500. I allready searched in some forums but all I foound is summed up in your post from Mar 10th.

Would be very helpful to get some information about it.
0 Likes