wafa_ath
wafa_ath
what causes the STM32F429ZI to experience a hard error when attempting to cast a value into float?
The hard fault occurs because the FPU is not enabled. Add SCB->CPACR |= (0xF << 20); in your initialization code to enable the FPU, and ensure your project settings in Atollic TrueSTUDIO are configured for FPU usage (-mfpu=fpv4-sp-d16, -mfloat-abi=hard).
5 replies