Skip to main content
Associate II
August 7, 2025
Solved

custom STSPIN32G4- Dual motor, 2nd motor does not work

  • August 7, 2025
  • 2 replies
  • 365 views

[PN]: STSPIN32G4
[VERSION]: 6.4.0
[TOOL]: Motor Control Workbench
[DETAILS]:In this design, the second motor does not work as the interrupts that invoke the FOC_HighFrequencyTask by setting the motor ID into the array FOC_array[] are not enabled (TSK_DualDriveFIFOUpdate() is never called). Motor 1 happens to work as it's ID is 0 and the array is 0 initialised. Also the task TSK_HighFrequencyTask is only invoked at the PWM rate, not twice the PWM rate as it should be called once per motor, ie twice the PWM rate..

[EXPECTED BEHAVIOR]: The motor 2 current should be modulated but stays at 0 as the FOC_HighFrequencyTask(M2) is never called.
[HOW TO REPRODUCE]: just start motor 2 from motor pilot

 
 
Best answer by GMA

Hello @GSB,

Each motor must be connected to a different ADC.
You can refer to the genuine EVSPIN32G4-DUAL board, which is a dual 1Shunt topology design.

2 replies

GMA
Technical Moderator
August 8, 2025

Hello @GSB,

Thank you for your report.
Unfortunately, the dual drive, dual single-shunt, and single ADC use case is not covered in our current MCSDK release. We will add a restriction message in the release note to inform users of this limitation.
In our current implementation, two different ADCs are required for each drive.


If you agree with the answer, please accept it by clicking on 'Accept as solution'.Best regards.GMA
GSBAuthor
Associate II
August 8, 2025
Do you mean each motor current sense must be connected to a separate ADC. Will my 2 motor design then work or is there any other changes i need to make to drive 2 motors?
GMA
GMABest answer
Technical Moderator
August 11, 2025

Hello @GSB,

Each motor must be connected to a different ADC.
You can refer to the genuine EVSPIN32G4-DUAL board, which is a dual 1Shunt topology design.

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