I was making BLDC motor program and my ramp for current for no good reason is saturating.
Ramp idea is simple, i have u32 current, and float current_f.
When i change set point (current) my current_f start to add or subtract 0.001 froam itself. But it is saturating at 32768.
volatile uint32_t current = 2000;
volatile float current_f = 5000.0f;
If i change float do double, it works as it should. When i switch back to float and software FPU( no Hardware FPU) same problem happens, it is saturating to 32768. What do i missing ? Is it normal, or my set size is to low for float ?
Thank you for your answers