- Posts: 17533
- Thank you received: 5334
Spinx1 to 7i85
stepgen 2s pins are available as GPIO
Please Log in or Create an account to join the conversation.
OT-CNC wrote: Since this is a lathe and I'm using X and Z, could the unused Y step pin be used for an enable?
Yes, you have 4 step/dir pairs per connector, and if you set num_stepgens=2 in the config then all 4 of those pins (on each header) become available as GPIO.
If you compare the show params list above with a similar one done after the config change you will see some "is-output" paramters appear which will help you spot which HAL pins are your newly-available GPIO pins.
Ah, and you need to "setp" them to outputs too.
Please Log in or Create an account to join the conversation.
# the SPINX1 has a /enable (low to enable)
setp hm2_5i25.0.7i84.0.0.output-00-invert 1
I'm going with the P2 internal connector for now:
setp hm2_5i25.0.gpio.017.out-invert 1 , also tried -not. Debug states setp requires 2 arguments, 1 given.
What do I need to change?
Please Log in or Create an account to join the conversation.
OT-CNC wrote: Debug states setp requires 2 arguments, 1 given.
You need to check the actual parameter names. From your parameter listing:
5 bit RW FALSE hm2_5i25.0.gpio.017.invert_output
5 bit RW FALSE hm2_5i25.0.gpio.017.is_opendrain
5 bit RW FALSE hm2_5i25.0.gpio.017.is_output
So
Please Log in or Create an account to join the conversation.
Here is what I have:
net spindle-enable motion.spindle-on => hm2_5i25.0.gpio.017.out
setp hm2_5i25.0.gpio.017.invert_output 1
setp hm2_5i25.0.gpio.017.is_output 1
It loads and when I look at the hal configuration and toggle the spindle cw, stp, ccw I can see the status leds on pin 017 react. What confuses me is that hm2_5i25.0.gpio.017.in is corresponding correctly.
The hm2_5i25.0.gpio.017.out status is yellow (high) when cw/ ccw is active.
Am I reading into this too far? Can I assume this pin is working correctly and proceed with wiring?
Please Log in or Create an account to join the conversation.
So it sounds like things are working.
Please Log in or Create an account to join the conversation.