AnsweredAssumed Answered

How to use the FPU module of s32k148?

Question asked by dong xh on Nov 27, 2017
Latest reply on Dec 3, 2017 by Robert Boys



These days , we are using s32k148, and encountering some problems in FPU module.

The development environment is the MDK5.0 of Keil, debugger uses J-Link, and is configured to use 'Single Precision'.

After the completion of the project initialization, the FPU module is not activated under the debugging environment:

S32_SCB->CPACR = 0

S32_SCB->FPCCR = 0

Program reset when using the defined float variable in the main program.


In addition, try the following test:

Instead of using the hardware debugger, use keil 'Use Simulator' for Debug:

In the debugging environment, the program runs normally, the floating point variable is normal, and the FPU module is activated

S32_SCB->CPACR = 0x00F00000

S32_SCB->FPCCR = 0x80000000

In view of the above floating-point operation, we hope to get the guidance of the experts as soon as possible