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.

LP-MSPM0G3507: Transition to Closed Loop Fails using DRV8316_EVM and PMSM motor

Part Number: LP-MSPM0G3507
Other Parts Discussed in Thread: MSPM0G3507, DRV8316, SYSCONFIG

Tool/software:

Hello Ti,

I am having the following issues when trying to run my PMSM motor using DRV8316_EVM with MSPM0G3507 + SDK 2_04_00_06 :

1-In sysconfig i can't see the ADC configurations for current sensing in i can see only ADC0_7, ADC1_6 and ADC1_3 are the only channels configured.

2-"maximum speed" system parameter is the no load speed or at which mechanical speed i should calculate it?

3-Can i debug in transition between states, for e.g i can't debug where the motorState variable is changing in sensorless version of the code is this provided as some library not open code?

4-Motor is able to reach open loop state and stay operational in it but whenever i try to move to closed loop (closeLoopDis = 0) it stops with Stall fault (abnormal emf lock -> it is the only enabled lock) and also i observe that the open loop current is higher than the reasonable values although i am tuning the OLilimit and i made Kp and KI params = 0 and I made sure the back emf is measured manually and i multiplied it by 10 as stated in the manual.

5- Do i need to configure the BaseVoltage as 44.59 in the GUI or 25.77 as i see in ISR.c in the default case it should result to MOTOR_VOLTAGE_BASE = 25.77 which will lead to pUserInputRegs->systemParams.voltageBase = MOTOR_VOLTAGE_BASE (i.e 25.7).......... while if i configured it in GUI directly as 44.59 it will be pUserInputRegs->systemParams.voltageBase = 44.59 

Finally the correct Base voltage equation In the MSPM0 Sensorless FOC tunning guide should be 3.3V / (R2 / (R1 + R2)) which is 44.27 instead of  3.3V / (R1 / (R1 + R2)) which is 3.5  correct?

Thank you,

  • Hi Shehab,

    1-In sysconfig i can't see the ADC configurations for current sensing in i can see only ADC0_7, ADC1_6 and ADC1_3 are the only channels configured.

    yes, the adc channel init is done inside application code, due to there will have some channel switch depends on the configuration customer select.

    See below code inside the SDK for your reference:

    Where the algorithm to read back ADC result:

    Where the algorithm configure the ADC channel:

    Where the macro definition for ADC channel:

    2-"maximum speed" system parameter is the no load speed or at which mechanical speed i should calculate it?

    Maximum speed is the highest speed you want your motor achieve with or without the load. It is the max mechanical speed* pole pairs.

    3-Can i debug in transition between states, for e.g i can't debug where the motorState variable is changing in sensorless version of the code is this provided as some library not open code?

    You can find it in the below register:

    4-Motor is able to reach open loop state and stay operational in it but whenever i try to move to closed loop (closeLoopDis = 0) it stops with Stall fault (abnormal emf lock -> it is the only enabled lock) and also i observe that the open loop current is higher than the reasonable values although i am tuning the OLilimit and i made Kp and KI params = 0 and I made sure the back emf is measured manually and i multiplied it by 10 as stated in the manual.

    Have you check your Ke setting? Normally it is the one we do check with your latest speed and trigger the abnormal emf fault if there has an incorrect value.

    5- Do i need to configure the BaseVoltage as 44.59 in the GUI or 25.77 as i see in ISR.c in the default case it should result to MOTOR_VOLTAGE_BASE = 25.77 which will lead to pUserInputRegs->systemParams.voltageBase = MOTOR_VOLTAGE_BASE (i.e 25.7).......... while if i configured it in GUI directly as 44.59 it will be pUserInputRegs->systemParams.voltageBase = 44.59

    25.77 = 44.59 / sqrt(3).

    25.77 is the motor base voltage, and 44.59 is the DC bus base voltage.

     pUserInputRegs->systemParams.voltageBase = DC bus base voltage, not the motor based value.

    B.R.

    Sal

  • Hello Sal,

    "Have you check your Ke setting? Normally it is the one we do check with your latest speed and trigger the abnormal emf fault if there has an incorrect value."

    as i mentioned in the question i already did measure it manually and multiplied it by 10 then set it in motor system params and major parts of code are pre compiled so i can't debug why i have this fault (i.e according to which calculations)...........so what do you suggest?

    "25.77 = 44.59 / sqrt(3). 25.77 is the motor base voltage, and 44.59 is the DC bus base voltage.

    pUserInputRegs->systemParams.voltageBase = DC bus base voltage, not the motor based value"

    a) No i see In the ISR.c file pUserInputRegs->systemParams.voltageBase = MOTOR_VOLTAGE_BASE (25.7) not DC_VOLTAGE_BASE (44.59) and this is the default value.

    b) According to the FOC Tuning guide[SLAU927C – MARCH 2024 – REVISED MARCH 2025] in section 6.1.6 Base Voltage (V), the calculation of base voltage should be as follow, BaseVolt= 3.3V / (R1 / (R1 + R2)) while i suspect it should be BaseVolt_correct = 3.3V / (R2 / (R1 + R2))....... because if i am using DRV8316 board with MSPM0G3507, R1=75Kohm R2=6.04Kohm, the BaseVolt =3.5V while if it is calculated using the BaseVolt_correct it will be 44.27 which is very close to the default 44.59 so can you confirm it is typo in the tuning guide?

    c) Provided the assumption in b) is correct and now the calculated base voltage is (44.27 V), if i set this value directly to the GUI the pUserInputRegs->systemParams.voltageBase will  be equal to 44.27 V not 25.77 V so to be clear which value i should set in the GUI for voltage base? is it the calculated value directly or calculated value / sqrt(3) ?

    Best Regards,

    Shehab