AnsweredAssumed Answered

Problem with KMS Current Control

Question asked by Pedro Correa de Castro on Oct 26, 2017
Latest reply on Oct 29, 2017 by Pedro Correa de Castro



I generated the code from the KMS GUI and I was testing the current control. The motor speeds up pretty smooth using the interface. However, when I tried from the code generated, the motor tries to start apparently with much higher torque then a  fault comes up and the motor stops abruptly.


Here follows the code snippet I inserted in order to use current control:


if(GPIO_DRV_ReadPinInput(kGpioSW3) == 0){
      case USER_BRAKE:
      user.state = USER_IDLE;
      case USER_IDLE:
      case USER_RUN_CURRENT:
      user.command.statorRefCurrent.q = _SQ(0.3/FULL_SCALE_CURRENT);
      user.state = USER_RUN_CURRENT;
   brake.config.brakingType = BRAKE_COAST;
   user.state = USER_BRAKE;


//Update drive module


Could you please help me solve this problem?