Skip to main content
DMeie.2
Associate III
March 4, 2024
Question

Motor Pilot bug: Torque resets to zero

  • March 4, 2024
  • 10 replies
  • 4022 views

I'm having following issue with the Motor Pilot that comes with the MCSDK 6.2.1 (V1.2.5).

I try to modify the Rev-up phase configuration.
Now when I write a torque value in any of the phases, this value resets to zero and is saved on the board (pressing "Read parameters" returns the zero values). If that happens, I cannot set it to any other value until I power-cycle the board, in which case it resets to the values predefined in firmware.

Any way to make this feature usable again?

10 replies

GMA
Technical Moderator
March 4, 2024

Hello DMeie.2,

REVUp table setting through Motor Pilot feature is not available for all boards (STSPIN3202 e.g) due to memory footprint constraint.
If feature is not available you will have an error visible on Pilot logs tab.
Please check 

GMA_0-1709569919342.png
If it is the case, un-select box and select in register_interface.c file, the necessary commands for your use case that fits in available memory.

 

If you agree with the answer, please accept it by clicking on 'Accept as solution'.Best regards.GMA
DMeie.2
DMeie.2Author
Associate III
March 5, 2024

Thanks for the reply, though it appears I was not completely clear about my issue.

The board I use is the Nucleo-G431RB.
The RevUp table feature is available and working in the MotorPilot. I can change the Duration and Speed just fine, and the changes are applied to the hardware.
But when I try to change the Torque, the value resets to zero and the motor doesn't spin up in this phase for obvious reasons.

GMA
Technical Moderator
March 5, 2024

Hello,

Two points:
- the Torque values on Pilot 1.2.5 RevUp table are now expressed in Amps (and not s16A as on older pilot versions). Using Torque values within power board allowed current range, values are correctly handled. Could you please verify it on your setup?
- There is an issue using high Torque values exceeding power board allowed range.
We will enter an internal ticket to solve this issue on further versions.

Thank you for your problem report.

If you agree with the answer, please accept it by clicking on 'Accept as solution'.Best regards.GMA
DMeie.2
DMeie.2Author
Associate III
March 5, 2024

I checked the points you mentioned.
The values I try to enter should be valid.

For reference, I'm using the Nucleo-G431RB controller board together with the X-NUCLEO-IHM08M1 power stage.
A BLDC motor with max current of 12A is used.

In the MC Workbench the Rev-Up values are set as follows:

DMeie2_0-1709650877797.png

The first issue now is that in the Motor Pilot, the values already show up slightly wrong:

DMeie2_1-1709650917026.png

Now when I change the Torque value of Phase 1 to "2" (or 2.000, doesn't matter) for 2A, press enter to apply the value and then press "Read parameters", the Torque of Phase 1 is now 0 and can't be changed to anything else until I power-cycle the device. Same happens for the other Torque values.

DMeie2_2-1709651161863.png

I can change the other values (Duration, Speed) just fine, there's only some rounding errors applied there.

GMA
Technical Moderator
March 5, 2024

Hello,

The slight difference on Torque target values comes FW internal conversion from Amps to s16Amps, and Pilot conversion from s16Amps reported by FW to Amps for Pilot GUI interface.
With Nucleo-G431RB/X-NUCLEO-IHM08M1/Dummy motor with max current = 12A on WB6.2.1 and Pilot1.2.5, values are correctly taken into account within allowed range.
As soon, the hFinalTorque value in RevUpControlM1 struct becomes negative (high values not correctly handled on our side), I see the negative value appearing on Pilot GUI, and set to zero when I click on the box.

GMA_0-1709656795396.png
On your use case, do you have errors visible in Pilot "Logs" tab?

 

 

If you agree with the answer, please accept it by clicking on 'Accept as solution'.Best regards.GMA
GMA
Technical Moderator
March 7, 2024

Hello,

Could you please send us your ".stwb6" file?
We would like to see where this different behavior comes from.

If you agree with the answer, please accept it by clicking on 'Accept as solution'.Best regards.GMA
DMeie.2
DMeie.2Author
Associate III
March 7, 2024

I attached the .stwb6 file I use for evaluation.
However, some changes have been made to the pin settings (this is for the evaluation of our own implementation), so it can't be used with the devboards without some manual cable routing.

Most notably is probably the change to have all motor-related analog inputs on ADC1.
If required, here's the routing table:

FunktionIHM08Nucleo-G4
E5VC7-6C7-6
3V3C7-16C7-16
Hall H1C7-17C10-13
Hall 5VC7-18C7-18
GNDC7-20C7-20
GNDC7-22C7-22
Curr_fdbk_PhAC7-28C7-28
VBUS_sensingC7-30C7-37
VL - TIM1_CH2NC7-34C10-12
Temp_fdbkC7-35C7-35
Curr_fdbk_PhBC7-36C7-30
Curr_fdbk_PhCC7-38C10-35
UL - TIM1_CH1NC10-15C7-23
VH - TIM1_CH2C10-21C10-21
UH - TIM1_CH1C10-23C10-23
WL - TIM1_CH3NC10-24C10-26
Hall H3C10-25C10-2
Hall H2C10-31C7-32
WH - TIM1_CH3C10-33C10-33

 

I also checked the logs, however there's no messages when that issue happens.

DMeie.2
DMeie.2Author
Associate III
April 15, 2024

@GMAAny more information on this?
It has been over a month now...

DMeie.2
DMeie.2Author
Associate III
May 16, 2024

@GMA  Monthly ping to hear back on this, as this is still a relevant issue...

Gael A
ST Employee
May 17, 2024

Hello DMeie.2,

Have you tried our latest MCSDK 6.3.0 release ? Can you confirm that you still experience the issue on the latest MotorPilot ?

If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.Hope this will help,Gaël A.
DMeie.2
DMeie.2Author
Associate III
May 17, 2024

I was not aware there's a new MCSDK release.
I will give it a try and report back.

Is there a way to subscribe anywhere to get notified about new releases?

GMA
Technical Moderator
September 4, 2024

Hello @DMeie.2,

Does MCSDK 6.3.0 release solved your issue?
If not, please have a look at this post

If you agree with the answer, please accept it by clicking on 'Accept as solution'.Best regards.GMA
DMeie.2
DMeie.2Author
Associate III
September 9, 2024

At least using the MotorPilot tool in version 6.3.0 did not fix this issue.
I'll wait for an updated version of it that hopefully implements the locales fix mentioned in the other thread.

Explorer
September 26, 2024

have also the same problem with version 6.3.1...

Associate III
December 6, 2024

Same problem here, can't seem to be able to write the TORQUE values. Any change sets them to 0 resulting in the parameters reading out 0 again from the controller side.

 

Using MC Workbench 6.3.2

Using the IHM03 kit with the Nucleo-G431RB and X-NUCLEO-IHM16M1 power board.