Hardfault due to coprocessor access?

I received the hardfault in the following image.

The function at the address 0x00028C44 is:

static uint32_t app_timer_ms(uint32_t ticks)
{
    // eg. (7 + 1) * 1000 / 32768
    //   = 8000 / 32768
    //   = 0.24414062
    float numerator = ((float)APP_TIMER_CONFIG_RTC_FREQUENCY + 1.0f) * 1000.0f;
    float denominator = (float)APP_TIMER_CLOCK_FREQ;
    float ms_per_tick = numerator / denominator;

    uint32_t ms = ms_per_tick * ticks;

    return ms;
}

The hardfault did not occur again after resetting. I'm not sure why this would occur. Could it be something to do with the FPU?

Parents Reply Children
Related