-
Notifications
You must be signed in to change notification settings - Fork 37
Description
Hello,
I am having trouble controlling the enable pin for the spindle.
I am currently using the MKS SBASE platform and the CPU map is configured accordingly, the pins to control the enable for the spindle should be P1.30 (en) or P1.31(dir), I am sending commands: M3 S500 (and moving) and M5 through UGS platform and there is no change on both pins, both are sending a voltage around 2.4v and stays like that. The PWM signal for controlling the speed is working fine and gets activated and deactivated by this commands, I still need a separate enable pin (from the pwm speed pin) for the spindle controller board that we are currently using.
VARIABLE_SPINDLE is enabled (config.h, line 363).
USE_SPINDLE_DIR_AS_ENABLE_PIN is enabled (config.h, line 408).
(disabling this by commenting it generates an error:
//grbl/cpu_map.h:612:37: error: 'TCCR2A' was not declared in this scope
612 | #define SPINDLE_TCCRA_REGISTER TCCR2A
| ^~~~~~
grbl/spindle_control.c:76:17: note: in expansion of macro 'SPINDLE_TCCRA_REGISTER'
76 | if (SPINDLE_TCCRA_REGISTER & (1<<SPINDLE_COMB_BIT)) { // Check if PWM is enabled.
| ^~~~~~~~~~~~~~~~~~~~~~
grbl/cpu_map.h:615:37: error: 'COM2A1' was not declared in this scope
615 | #define SPINDLE_COMB_BIT COM2A1
| ^~~~~~//
so its not possible for me to test with this disabled)
I also tried inverting the state for the enable by uncommenting INVERT_SPINDLE_ENABLE_PIN (config.h, line 226) but nothing changes.
Any advise would be much appreciated.
Thanks,
Wilhelm