I’ve been trying to get the motor into a freewheeling state, using the motor.disable() function.
But when I apply the function, the motor gets in a freewheeling state, but with some very high resistance.
Where does that come from and how can I get rid of it?
I think I gave the explanation in my other answer - the driver used cannot be fully disabled, and the motor.disable() function leaves the low side FETs on in this case.
This will shut off all the FETs so that the windings are unconnected. Call motor.disable() first. I would actually have expected that you also need to disable the hardware timer being used, but perhaps setting the pins to input mode simply disables the PWM output of the timer.
Note that you probably want INPUT with pull-down to make sure the driver input is really off. But actually it would probably be better to shut off the PWM (disable the hardware timer) and then use pinMode OUTPUT and LOW to properly switch off the FETs.