File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 374374#ifdef VARIABLE_SPINDLE
375375
376376 // NOTE: On the 328p, these must be the same as the SPINDLE_ENABLE settings.
377- #define SPINDLE_PWM_FREQUENCY 10000 // KHz
377+ #define SPINDLE_PWM_FREQUENCY 1 // KHz
378378#define SPINDLE_PWM_DDR GPIOA
379379#define SPINDLE_PWM_PORT GPIOA
380380#define RCC_SPINDLE_PWM_PORT RCC_APB2Periph_GPIOA
381381#define SPINDLE_PWM_BIT 8
382382#endif // End of VARIABLE_SPINDLE
383- #define SPINDLE_PWM_MAX_VALUE 255
383+ #define SPINDLE_PWM_MAX_VALUE 1000
384384#ifndef SPINDLE_PWM_MIN_VALUE
385385#define SPINDLE_PWM_MIN_VALUE 1 // Must be greater than zero.
386386#endif
Original file line number Diff line number Diff line change 538538#define DEFAULT_X_MAX_TRAVEL 200.0f // mm NOTE: Must be a positive value.
539539#define DEFAULT_Y_MAX_TRAVEL 300.0f // mm NOTE: Must be a positive value.
540540#define DEFAULT_Z_MAX_TRAVEL 90.0f // mm NOTE: Must be a positive value.
541- #define DEFAULT_SPINDLE_RPM_MAX 100 .0f // rpm
541+ #define DEFAULT_SPINDLE_RPM_MAX 9000 .0f // rpm
542542#define DEFAULT_SPINDLE_RPM_MIN 0.0f // rpm
543543#define DEFAULT_STEP_PULSE_MICROSECONDS 10
544544#define DEFAULT_STEPPING_INVERT_MASK 0x1f
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ void spindle_init()
7676
7777 timerInitStructure .TIM_Prescaler = F_CPU / 1000000 - 1 ; // 1000
7878 timerInitStructure .TIM_CounterMode = TIM_CounterMode_Up ;
79- timerInitStructure .TIM_Period = SPINDLE_PWM_MAX_VALUE ;
79+ timerInitStructure .TIM_Period = SPINDLE_PWM_MAX_VALUE - 1 ;
8080 timerInitStructure .TIM_ClockDivision = TIM_CKD_DIV1 ;
8181 timerInitStructure .TIM_RepetitionCounter = 0 ;
8282 TIM_TimeBaseInit (TIM1 , & timerInitStructure );
You can’t perform that action at this time.
0 commit comments