This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Debugging motor circuit hangs up

Other Parts Discussed in Thread: TMS320F28035

I have a circuit with TMS320F28035 that controls a 90V DC motor connected to rectified 115 VAC using phase control (SCRs+ISO trafo for gates).

It all woks good when JTAG is disconnected or when motor is off, but when I connect JTAG programmer and try to debug with Code Composer 4.0, the debugger hangs up as soon as the motor starts.

I also tried JTAG programmer with isolated interface and another time a USB isolator adapter box but still the same problem.

Connecting grounds together fried the programmer and the computer after a short while with motor running.

Any ideas on how to debug such a circuits?

Martin

  • Martin,

    If the exact same code is running with the motor disconnected and JTAG running, it seems as though there may be a circuit noise problem introduced by the motor.  You may want to scope out the JTAG pins with JTAG working with the motor disconnected and compare them to when the motor is connected.  Also, if possible, when JTAG hangs try disconnecting / powering down just the motor to see if JTAG returns.

    Kris

  • Kris,
    The same code is running with/without debugger.

    The motor circuit is isolated from the rest by transformers and relays except the BEMF speed sensing circuit which is connected to the motor thru some resistors and protected by diodes.

    The noise is getting into the circuit for sure and the debugger usually prints some message about connection problems and hangs when motor runs but the circuit & MCU keeps working OK.

    After that, stopping the debugger or killing it is the only recovery. It never comes back by itself.

    The question is how to prevent noise from screwing up JTAG which is the only circuit bothered by it?

    The debugger also has problems often connecting or staying connected to the MCU which makes me think that there is a software driver issue. Anybody has similar problems? How reliable is the debugger for you? I am having a lot of problems with this software and JAVA occasionally crashes too.

    Martin

  • Martin,

    Can you scope out your debug signals both with JTAG working and during the debugger disconnect (most likely when the motor first starts) and let us know what you find?  Let's focus on the TRST pin to begin with.  With the debugger connected this pin should be driven high and remain high.

    Kris

  • Kris,

    On my board I have a 2.2k pull down on TRST. Other than that all lines are directly hooked up to JTAG on TI Docking station (w/o SIMM) USB-EMU R3 XDS100v2 emulator.

    When motor starts, I see a few spikes on TRST line less than 1uS long each. The first one usually hits the gnd.

    Martin

  • I added 0.1 uF on TRST line and there are fewer spikes which are now ~10nS long (DSO resolution) and after a few motor starts the debugger is still working.

    Martin

  • Martin,

    Great, glad to hear this has been resolved.  That spike was most likely resetting JTAG hence losing the connection.  You may want to inspect any other system critical signals for your application to make sure they are not being affected as well just to be safe.

    Kris