Skip to content

Commit

Permalink
Fix: misconfig FPU in sys_clock_init
Browse files Browse the repository at this point in the history
When testing stm32f429i on qemu-gnueclipse, it bump out
"qemu-system-gnuarmeclipse: Attempt to set CP10/11 in SCB->CPACR, but FP is not supported yet."

Found in sys_clock_init only check STM32F4X, then enable FPU and floating point
state preservation.

Adding CONFIG_FPU to prevent misconfig of FPU.
  • Loading branch information
louisom committed Feb 2, 2017
1 parent 18132eb commit ca68ec7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion platform/stm32-common/rcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void sys_clock_init(void)
{
volatile uint32_t startup_count, HSE_status;

#if defined(STM32F4X)
#if defined(STM32F4X) && defined(CONFIG_FPU)
/* Enable the FPU */
*SCB_CPACR |= (0xf << 20);
/* Enable floating point state preservation */
Expand Down

0 comments on commit ca68ec7

Please sign in to comment.