diff --git a/grbl/stepper.c b/grbl/stepper.c index 20b1126..33bb51f 100644 --- a/grbl/stepper.c +++ b/grbl/stepper.c @@ -949,7 +949,7 @@ void st_prep_buffer() float inv_rate = dt/(last_n_steps_remaining - step_dist_remaining); // Compute adjusted step rate inverse // Compute CPU cycles per step for the prepped segment. - uint32_t cycles = ceil( (TICKS_PER_MICROSECOND*1000000*60)*inv_rate ); // (cycles/step) + uint32_t cycles = ceil( float(SystemCoreClock)*60*inv_rate ); // (cycles/step) #ifdef ADAPTIVE_MULTI_AXIS_STEP_SMOOTHING // Compute step timing and multi-axis smoothing level.