I am using this https://github.com/watterott/SilentStepStick stepper driver to drive a stepper motor. I am having trouble setting pins to HI-Z/floating to configure the stepper driver.

To set the driver to 16 micro steps and full interpolation, one has to set 2 configuration pins to HI-Z/floating (datasheet, p.9). The example code on github (TMC2100.ino) just doesn't touch the pins at all, this works fine for me.

However, if I only add the lines:

pinMode(11, INPUT);  //connected to CFG1
pinMode(10, INPUT);  //connected to CFG2

which should set the pins to HI-Z/floating, the result is different. The motor turns at the same speed, but makes more noise, I believe the driver is using the 16 step method with no interpolation. This corresponds to both pins being interpreted as high.

This makes me believe, that the Arduino uses a different code at startup than being used in pinMode(x, INPUT) to configure all pins. I am using a Teensy 3.1/3.2.

How can I solve the problem? Pins 11 and 10 are hard wired to the driver, as it replaced the well known A984. Apart from the obvious "don't configure the pins then", I would like to know what's going on here.

migrated from electronics.stackexchange.com May 10 '16 at 15:43

This question came from our site for electronics and electrical engineering professionals, students, and enthusiasts.

  • Examine your circuit for possible pulling resistors. Check the Teensy code details or look up and directly query the relevant raw kinetis gpio configuration registers. – Chris Stratton May 10 '16 at 12:08
  • If there were any pulling resistors, then it should not work when the pins are not configured in code. – user765269 May 10 '16 at 12:12
  • Then check the implementing code for the function you are calling and raw register values, or move this to the PJRC support forum. – Chris Stratton May 10 '16 at 12:16
  • 2
    The Teensy has internal pull-up/pull-down resistors which can be enabled or disabled through software, see e.g. p. 231 here. You may want to check the "pull enable" (PE) bit in PORTx_PCRn. – JimmyB May 10 '16 at 12:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy