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.

TMS320F28054M: How to reverse the direction for Inertia Identify

Part Number: TMS320F28054M

In lab 5c - Inertia ID

I want to use negative direction for Inertia ID, what parameter do I need to change? 

  • SpinTAC Velocity Identify is only designed to run in the positive speed direction.  It does not support running in the negative direction.

    If you want the motor to spin in the opposite direction simply switch any two of the motor phase connections.  This will cause the motor to rotate the opposite direction but will still regard it as the positive direction.

  • HI Adam,
    I did few tests about the direction. If I only switched any of two motor phase connections, it would cause my motor not run properly and overheating my motor in few seconds.
    But if I switched any of the two motor phases AND switched encoder QEPA and QEPB connections as well. Then motor can run in opposite direction without any problem.
    I am not quite sure why...

    Since I don't want to changed my hardware wire connections, so I tried to switched QEPA-GPIO20 and QEPB-GPIO21 in hal.c.  and it doesn't work.

  • Qiang Guo said:
    But if I switched any of the two motor phases AND switched encoder QEPA and QEPB connections as well. Then motor can run in opposite direction without any problem.
    I am not quite sure why...

    The motor and encoder need to have the same notion of positive rotation.  This is typically defined as:

    1. Motor rotates anti-clockwise when looking at end of motor shaft (this implies that the motor phases are in the correct order)

    2. Encoder channel A is leading channel B

    So if you change any two motor phases so that the motor shaft is rotating clockwise, you will also need to swap the encoder phases so that the MCU perceives channel A is leading channel B.