Hi.
I'm using the arm_sin_f32 function to generate an array of sine wave values. However when this function gets called the softdevice crashes.
I've included:
#include "nrf52.h"
#include "arm_const_structs.h"
#include "arm_math.h"
Defined "ARM_MATH_CM4" in the preprocessor symbols.
I've also initialized
void FPU_IRQHandler(void)
{
// Prepare pointer to stack address with pushed FPSCR register.
uint32_t * fpscr = (uint32_t * )(FPU->FPCAR + 0x40);
// Execute FPU instruction to activate lazy stacking.
(void)__get_FPSCR();
// Clear flags in stacked FPSCR register.
*fpscr = *fpscr & ~(0x0000009F);
}
And made changes to the power_mange function
static void power_manage(void)
{
#if (__FPU_USED == 1)
__set_FPSCR(__get_FPSCR() & ~(0x0000009F));
(void) __get_FPSCR();
NVIC_ClearPendingIRQ(FPU_IRQn);
#endif
uint32_t err_code = sd_app_evt_wait();
APP_ERROR_CHECK(err_code);
}
I've tried searching for similar problems, but I haven't found a fix yet.