Hello,
I’m curious if its possible to disable the FPU on the SparkFun Edge board. If so, is there any literature on how to do this?
Thank you!
Hello,
I’m curious if its possible to disable the FPU on the SparkFun Edge board. If so, is there any literature on how to do this?
Thank you!
The best information we can offer is to point you toward the datasheet https://cdn.sparkfun.com/assets/c/1/b/7 … 0_10_0.pdf - page 74 mentions a few power modes for the FPU (they refer to it as m4 in the document), but does not mention disabling as far as I can tell
Hope this helps!
The FPU can be enabled and disabled by calling the appropriate HAL functions. It may save a tiny bit of power to disable it, but I’m guessing that it is hardly worth the trouble. In any case, here are the HAL calls:
//*****************************************************************************
//
//! @brief Enable the floating point module.
//!
//! Call this function to enable the ARM hardware floating point module.
//!
//! @return None.
//
//*****************************************************************************
void
am_hal_sysctrl_fpu_enable(void)
{
//
// Enable access to the FPU in both privileged and user modes.
// NOTE: Write 0s to all reserved fields in this register.
//
SCB->CPACR = _VAL2FLD(SCB_CPACR_CP11, 0x3) |
_VAL2FLD(SCB_CPACR_CP10, 0x3);
}
//*****************************************************************************
//
//! @brief Disable the floating point module.
//!
//! Call this function to disable the ARM hardware floating point module.
//!
//! @return None.
//
//*****************************************************************************
void
am_hal_sysctrl_fpu_disable(void)
{
//
// Disable access to the FPU in both privileged and user modes.
// NOTE: Write 0s to all reserved fields in this register.
//
SCB->CPACR = 0x00000000 &
~(_VAL2FLD(SCB_CPACR_CP11, 0x3) |
_VAL2FLD(SCB_CPACR_CP10, 0x3));
}
Thank you! I’m going to give it a try.
This worked. Thank you so much!
robin_hodgson:
The FPU can be enabled and disabled by calling the appropriate HAL functions. It may save a tiny bit of power to disable it, but I’m guessing that it is hardly worth the trouble. In any case, here are the HAL calls://*****************************************************************************
//
//! @brief Enable the floating point module.
//!
//! Call this function to enable the ARM hardware floating point module.
//!
//! @return None.
//
//*****************************************************************************
void
am_hal_sysctrl_fpu_enable(void)
{
//
// Enable access to the FPU in both privileged and user modes.
// NOTE: Write 0s to all reserved fields in this register.
//
SCB->CPACR = _VAL2FLD(SCB_CPACR_CP11, 0x3) |
_VAL2FLD(SCB_CPACR_CP10, 0x3);
}
//*****************************************************************************
//
//! @brief Disable the floating point module.
//!
//! Call this function to disable the ARM hardware floating point module.
//!
//! @return None.
//
//*****************************************************************************
void
am_hal_sysctrl_fpu_disable(void)
{
//
// Disable access to the FPU in both privileged and user modes.
// NOTE: Write 0s to all reserved fields in this register.
//
SCB->CPACR = 0x00000000 &
~(_VAL2FLD(SCB_CPACR_CP11, 0x3) |
_VAL2FLD(SCB_CPACR_CP10, 0x3));
}
hey,
This development board comes with a power shut off feature, by connecting a pushbutton to the On/Off pin. The 3.3V power supply can be completely disabled by holding the button for five seconds and turned back on by a brief button press.