Hi,
I'm currently developing an MFM alternative on rp2040 (https://github.com/pfn/rrf-rp2040-mfm-firmware) that supports mode-switching using an output pin from Duet, but I'm also using the output pin to check mode-switch status and read direction when using pulse-mode. When I create a GPIO pin for output, then switch it to input to read via sensors.gpIn[x] and then switch it back to GPIO output, if the Q-frequency setting for M950 is not altered, then M42 to the GPIO pin is subsequently ineffective until the Q parameter to M950 is updated. I am currently testing this behavior on duet2wifi and have seen this occurring on 3.4.6 as well as 3.5rc2
For example:
M950 P0 C"exp.heater3" Q1000
M42 P0 S255
G4 P10
M42 P0 S0
G4 P10
M950 P0 C"nil"
M950 J0 C"exp.heater3"
check sensors.gpIn[0].value
G4 P10
check sensors.gpIn[0].value
M950 J0 C"nil"
; any amount of `M950 P0 C"nil"` followed by `M950 P0 C"exp.heater3" Q1000` will not make any difference as long as Q1000 does not change
M950 P0 C"exp.heater3" Q1000
M42 P0 S255 ; this does not take effect
G4 P10
M42 P0 S0 ; this does not take effect
G4 P10
M950 P0 C"exp.heater3" Q10000 ; switch from 1khz to 10khz
M42 P0 S255 ; this now works
G4 P10
M42 P0 S0 ; this now works
G4 P10
I'm overloading the pin that sends commands to my mfm to send data back to duet for 2 things: confirmation that mode-switches worked, and when operating in pulse-sensor mode also emit the direction of the pulse.
I don't know if this behavior is duet2wifi specific, the actual device I want to run this on is a duet3mini5. The duet2wifi happens to be an available board I can use for testing.
35.2g