Search

2019年9月29日 星期日

Enable STM32F4 FPU

1. ./Libraries/CMSIS/Device/ST/STM32F4xx/Include/stm32f4.h -> add
#include <arm_math.h>
2. ./system_stm32f4xx.c -> in "void SystemInit(void)" add
#if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
SCB->CPACR |= ((3UL <<10*2)|(3UL <<11*2));/* set CP10 and CP11 Full Access */
#endif
3.main.c add
#define __FPU_PRESENT
#define __FPU_USED

沒有留言:

張貼留言