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.

DRV8301-69M-KIT: Allow motor setup measurements in Lab 5A

Part Number: DRV8301-69M-KIT

I am trying to utilize the eval board to both characterize a BLDC motor and to also run a test using the parameters. My basis is Lab5b. I have set up the serial port to be interrupt driven so that I can send commands to the board. I have a test stand that we bolt the incoming motor to mechanically unloaded. I want to command the Lab 5b code to run a characterization as equivalent to Lab 2a. We then want to take the motor and put it into the fixture that allows us to mechanically load the motor and run it at different speeds. I have evaluated the code in both Lab 2a and Lab 5b to try to determine how this can be done. The docs state that the first time the motor is run if CTRL_setFlag_enableUserMotorParams() is set to false then the motor will run the characterization. Observing Lab 2a this seems to be what I expect and after the characterization is complete the motor stops. I am trying to determine what the mechanisms is that does this and I don't see it. Can someone help point to how this is done?


  • You can still use lab02a or lab02b to set the gMotorVars.Flag_Run_Identify to "true"/"1" and set the MotorVars.SpeedRef_krpm with target speed to run the motor as using lab05b if gMotorVars.Flag_Run_Identify is changed to "false"/"0" when the motor identification was completed.

  • This does not seem to work. The motor stops if the gMotorVars.Flag_Run_Identify is set to zero at any point.

  • Continue to use lab02, set the gMotorVars.Flag_Run_Identify to "1" again after completed identification.

  • Ok let me try to be more specific. What I am trying to figure out is what the controlling mechanism is for running the characterization. Let me focus on Lab2. After the characterization is run the motor stops. At the end of the lab2 code it has a comment followed by a command which appears to try to reset the control

    // set the default controller parameters (Reset the control to re-identify the motor)
    gMotorVars.Flag_Run_Identify = false;

    Although this would appear to reset to the same state for motor identification as when the lab was started it does not. It appears some values are still in the code that are not reset. If you reflash the code and run the identification it works just the same each time. But if you run identification, stop, and then run again the sounds made by the motor and the overall process is different. I need to know what needs to be reset to put the controller in the same state as a complete reflash. 

  •  The function you mentioned will not be called if you don't set gMotorVars.Flag_enableSys to "0". Only the gMotorVars.Flag_Run_Identify will be set to "1" after identification completed, so you can set the gMotorVars.Flag_Run_Identify to "1" again for re-start the motor with the identified parameters.