[2.0.x] Poll all endstops, even when stationary#11123
[2.0.x] Poll all endstops, even when stationary#11123thinkyhead merged 1 commit intoMarlinFirmware:bugfix-2.0.xfrom
Conversation
|
This PR seems okay as far as I've examined it. Are the core kinematic issues currently just with the sensorless homing? The main thing to watch out for with sensorless homing is that the endstop triggered states are extremely short-lived. |
|
Yes, i do suspect exactly the same with sensorless homing. In fact, without using ENDSTOP_INTERRUPT am not even sure if it is possible to read them. And NOISE_FILTER i am absolutely sure it does not work with sensorless homing (At some point I even considered just copying endstop state bypassing filtering for those SENSORLESS inputs... |
|
@smoki3 ... Are you using ENDSTOPS_INTERRUPT feature ? |
|
No it's disabled. But what I nocticed: on my actual configuration I interchanged the diag1 pins from the x and y axis. Nonetheless it worked before, even with the interchanged pins. |
|
Previously the endstops (when polled) were checked frequently enough (on every stepper ISR) to catch sensorless homing signals. That is no longer the case, so |
|
@thinkyhead : At some point i asked myself how short the DIAG1 pulse would be (I have no TMC2130 drivers to test... ), I've read the whole datasheet but no mention is done on pulse width. What i do suspect is that the signal is HI while pulses are being received to spin the motor. After all, it is using an Stall detector, so if motors try to move, stall can be detected, and otherwise not. So, as limits only trigger when motor moves, even without ENDSTOPS_INTERRUPTS , it still should work... |
|
Measured as 436µs, 1316µs, 683µs and 1300µs. |
|
@teemuatlut : So, essentially, this supports the idea that the pulse will be long enough (because the motor is still being stepped to try to make it move) to trigger stopping the motor, so everything should be fine 👍 |
ae1981c to
e05560d
Compare
|
Added a sanity-check…
|
|
@thinkyhead Probably yes. Sensorless homing for Z axis is mostly impossible, except for deltas. So, better to have a good Z endstop without noise ... ;) |
Endstop fixes suggested by @ejtagle. Split off from #11098.
When
ENDSTOP_NOISE_FILTERis enabled, the endstops are always polled. But, there was a problem there, as when the motors do not move, the endstop switches reading was skipped. So, i removed that condition, but just for the endstop line read. This seems to solve #11056 and several homing issues.