Schildkroet / GRBL-Advanced

Grbl-Advanced is a no-compromise, high performance, low cost alternative for CNC milling. This version of Grbl runs on a STM32F411RE / STM32F446RE Nucleo Board. Now with backlash compensation, multi-axis and Tool Table support!
GNU General Public License v3.0
283 stars 84 forks source link

500 Khz #51

Closed IhsanFuadi3 closed 3 years ago

IhsanFuadi3 commented 3 years ago

Hi in the nucleo f446 the speed of each axis can be up to 500 khz? thanks before

Schildkroet commented 3 years ago

Hello, i never tried, but i think it should be possible. But you have to change max_step_rate https://github.com/Schildkroet/GRBL-Advanced/blob/software/grbl/Config.h#L313-L317

IhsanFuadi3 commented 3 years ago

thank for you reply sir, I change max_step_rate and F_CPU in util.h,and it's working

Schildkroet commented 3 years ago

You shouldn't change F_CPU unless you actually change the clock tree. Otherwise grbl won't calculate step rates etc correct

IhsanFuadi3 commented 3 years ago

you mean possible miss step?

Schildkroet commented 3 years ago

No, wrong feedrate etc

IhsanFuadi3 commented 3 years ago

oo i see,but if i just change max _step_rate,grbl only up to 250 khz,how i increase more than 250 khz?

Schildkroet commented 3 years ago

Double timer frequency here https://github.com/Schildkroet/GRBL-Advanced/blob/software/HAL/TIM/TIM.c#L147-L155 https://github.com/Schildkroet/GRBL-Advanced/blob/software/grbl/util.h#L46

IhsanFuadi3 commented 3 years ago

if may i know,how calculate timer frequancy,if I want 500 khz sir?

Schildkroet commented 3 years ago

TIM_TimeBaseStructure.TIM_Prescaler = 7-1; // 24 MHz

Change to : TIM_TimeBaseStructure.TIM_Prescaler = 3; // 48 MHz

F_TIMER_STEPPER 48000000UL

IhsanFuadi3 commented 3 years ago

i use Nucleo F446 sir

IhsanFuadi3 commented 3 years ago

is there any problem if i set max_step_rate to 500000 Khz sir?with your suggest frequency

Schildkroet commented 3 years ago

I didn't tried it yet. You have to find out yourself

IhsanFuadi3 commented 3 years ago

Ok Sir,thanks for the reply