Traumflug
Traumflug
> You can hear the steppers move sometimes at different speeds, maybe 10%-30% slower than expected This is a long standing bug. The last acceleration step is often not executed....
Wohoo, 360 kHz!
Looks like an overflow in line 892 in dda.c: ``` C move_c = (pgm_read_dword(&c0_P[dda->fast_axis]) * int_inv_sqrt(dda->n)) >> 13; ```
It could be negative with an earlier algorithm, when acceleration was recalculated for every single step, based on the result of the previous step. It was positive during acceleration, then,...
P.S.: during normal operation `dda->total_steps` is never changed, so it'll never reach zero. Changing it also messes up the Bresenham algorithm (first part in dda_step() ). Changing it on an...
Excellent finding! Looks like I have to test this new version against numbers on the other end of the range, like dda->n = 1. I'll also look up where int_inv_sqrt()...
Whatever variant I use on Cortex-M0, performance is almost equal and quite good: ``` C uint32_t i, j; volatile uint32_t result; serial_writestr_P(PSTR("int_sqrt() start\n")); for (i = 0; ! (i &...
My interpretation: - The actual values don't matter, calculations are always equally fast within a few percent. - If one of the variants is substantially faster on a Cortex-M4, it's...
I've put this on my plan. It's also possible to have two versions. ARM compilers define __ SOFTFP__ , so if __ ARMEL __ is defined but __ SOFTFP __...
Yes, this is tricky. Code dropped in by a genius. Now, remove the first two and the last two lines: ``` #define DEFINE_TEMP_SENSOR(name, type, pin, additional) \ LPC_IOCON->pin ## _CMSIS...