Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 3 of 3

Thread: Motor Driver problem when uploading new sketch

  1. #1

    Motor Driver problem when uploading new sketch

    I have a T3.5 with an motor driver (MC33926). The interface is with two pwms. The problem: when uploading a new sketch while driving the motor, the motor spins full speed for couple of ms.
    After looking at the pwm pins with the Oszi I found the following:
    Click image for larger version. 

Name:	DS1Z_QuickPrint9.png 
Views:	6 
Size:	40.6 KB 
ID:	16640

    blue: the line with is driven with pwm.
    yellow: other pwm line which is held low.
    The moment the pwm stops is when I upload the new sketch. Depending of the last pwm state, the pin is held low or high. If high the motor will spin full speed for a couple of ms, which is not really something practical.
    Any explanaitions why the teensy stops pwm, holds the last pwm state for a couple ms and then pulls both high?


  2. #2
    Senior Member
    Join Date
    Apr 2014
    Try adding a pull down resistor, say 4k7 to the pin. During the upload the Teensy pin will float which might generate the observed effect.

  3. #3
    thanks, I tried that. But same issue. In the Oszi image above, when the pwm stops and before the yellow line gets pulled up, in this intersection a pullup wont change the states of the pins. So I guess the teensy actively keeps the yellow line low and the pwm line to the last pwm state.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts