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.

CCS/TMS320F28069: Over-Current Protection

Part Number: TMS320F28069


Tool/software: Code Composer Studio

hey everyone,

i'm just wondering where exactly in the InstaSPIN-labs it is ensured that the phase currents don't exceed the USER_MOTOR_MAX_CURRENT.

can anyone tell me?

thanks a lot in advance!

  • The USER_MOTOR_MAX_CURRENT is used to set a value (internal to the private ROM code) called maxCurrent_pu. This value is defined as USER_MOTOR_MAX_CURRENT/IQ_FULL_SCALE_CURRENT_A. maxCurrent_pu sets outmax for the speed PI controller, which limits the amount of torque current that can be commanded by the speed PI controller. As a result, the limit is set in software for the speed PI controller. The HW limits are set in HW using the trip zones. For instance, the DRV devices have max Vds settings to limit the current, and can be set via SPI. They also have integrated OCP that can trip the C2000 trip zones. In short, the true over-current protection is done in HW, and only the torque current command is limited in SW by the speed PI controller

    Sean
  • thank you sean!
    can you also tell me where the code can be found that ensures that the value of gMotorVars.MaxAccel_krpmps does not get overstepped?
    i can see that in the later labs (lab 6) it is controlled in traj_run() but this method isn't used in for example lab5b.
  • The maxAccel is handled by the trajectory generator, which is called in the mainISR() in CTRL_setup()->CTRL_runTraj(). This function is again in masked ROM, and works similarly to limit the commanded Iq/Id references in the PID controller

    Sean