grblHAL / STM32F4xx

grblHAL driver for ST STM32F4xx (Nucleo-64, Blackpill)
Other
91 stars 85 forks source link

Lathe with STM32F411 #180

Open tuxcnc opened 5 months ago

tuxcnc commented 5 months ago

Hi. I made some tests with BlackPill (411, firmware from Web Builder) connected to two generators, one 3200 Hz as pulses, and second 1 Hz short pulses as index. I surprised the G33 (and G76 too) works after M5 (spindle off), not after M3 (spindle on). The second problem I found is why, and for what, the G33 checks first is spindle turns, and gives error if not? The G33 has timeout for case of no index pulses, and in my opinion it is enough. I think, the check is spindle turns prevents from G33.1 implementation, because there is direction change and G33 procedure must starts when spindle speed is zero... Regards.

JeffHank1 commented 4 months ago

I have a SKR Pro V1.2 up and running a small lathe now with the latest version of Grbl firmware from the Web Builder. I am running only XZC Gcode for now. I have 2 Hall effect sensors working for Spindle Sync for a different program = Index (1 magnet) and Sync (4 magnets). I realize Threading and Spindle Sync are still a work in progress and not fully tested. I think the signal pins are buried (on purpose) somewhere in the Grbl file maze. I am happy to test the Spindle sync but need the sensor pins for this board. Thank you

terjeio commented 4 months ago

I think the signal pins are buried (on purpose) somewhere in the Grbl file maze.

Not really, the issue is that only a few pins are supported making it tricky to assign them. E.g. this and this map file has definitions for them.

The SPINDLE_PULSE_PIN is the most limited, if GPIOD 2 can be used then that is preferable, if not a pin that can be routed as a counter input is required - and this is not always easy to achieve. The SPINDLE_INDEX_PIN can be any interrupt capable pin.