2025-08-13 10:49 AM
We have a design on an ST32G431 based on the B-G431B-ESC eval board that we are trying to migrate to an STSPIN32G4. However the tools appear to not let us set up the same 3-shunt, internal op-amp, internal PGA, differential configuration on STSPIN. There seems to be a problem with the 3rd op-amp and supporting differential mode.
All works fine with the B-G431B-ESC based design but if I create a board based on STSPIN the workbench generates errors.
RCSConnect: ThreeShunt_RawCurrents_Differential_InternalGain Global NO OPAMP for Phase V
We see the same errors if we load the EVLSPIN32G4-ACT board in the workbench and hit "go to summary". The difference with the EVL board is that it has a number of different variants so will still load but doesn't offer the "3-shunt + differential" option even though it is in the board config file.
The pins appear to be available and as far as we understand it the STSPIN is based on the same ST32G431 die so if it works on a ST32G431 it should work on an STSPIN32G4, so is this a tool bug or are the tools protecting us from a silicon problem? We are using Motor control workbench 6.4.0.
Thanks.
Solved! Go to Solution.
2025-08-28 2:33 AM
Hello @Clive_S,
The limitation is not the current sensing topology, the ThreeShunt_RawCurrents_Differential_InternalGain topology is available on the STM32G4 series.
The limitation is on the OPAMPx input selection, which must be INM0, as on the B-G431B-ESC.
On the EVLSPIN32G4-ACT board, the VSHUNT2N signal is connected to the PC5 pin (STSPIN/STM32G4).
The PC5 pin only accesses the OPAMPx_VINM1 input, as specified in the RM0440 document.
The INM0 limitation in the ConnectionParameters.json
file is valid.
2025-08-14 6:36 AM
Hello @Clive_S,
For the EVLSPIN32G4-ACT board, the error message originates from an MCSDK internal limitation.
The ConnectionParameters.json file, located in the MC_SDK_x.x.x\Utilities\PC_Software\STMCWB\assets directory, lists the available current sensing topologies. For the STSPIN32G4 MCU, the Differential InternalGain topology is defined as follows:
"ThreeShunt_RawCurrents_Differential_InternalGain": {
"OpampSignals": [
[ "CURRENT_SHUNT_?P", "_VINP" ],
[ "CURRENT_SHUNT_?N", "_VINM0" ]
],
This definition indicates that only the VINM0 OpAmp input can be used.
The point will be reported to the dedicated team to identify the root cause of the limitation. However, according to the STSPIN32G4 datasheet, the OpAmp2 VINM1 PA5 input can also be used.
Changing the configuration from [ "CURRENT_SHUNT_?N", "_VINM0" ]
to [ "CURRENT_SHUNT_?N", "_VINM" ]
allows you to bypass this restriction.
We will provide an update as soon as possible regarding the root cause of this limitation.
2025-08-14 10:49 AM
Thanks @GMA,
That has allowed me to create a board/project and it does appear to have the same configuration I had in the ST32G431 with the opamps in differential mode.
Cheers
Clive
2025-08-20 6:49 PM
你好,
我在使用STSPIN32G4配置的时候出现这个Error
2025-08-21 2:14 AM
Hello @一hang,
As mentioned in ST Community Terms and Conditions: The language of the Community is English.
It is preferable to create a new post for a new topic.
2025-08-25 6:34 AM
Hello @Clive_S,
Unfortunately, the restriction on VINM0 is relevant.
The complete current op amp topologies are described in the STM32G4 Reference manual RM0440.
As mentioned in Figure 175, only VINM0 is available for this topology.
2025-08-26 2:47 AM
Hi @GMA ,
I'm not quite clear, is this a difference getween the STSPIN and the G431 or is this a restriction on the whole STM32G4 series? It appears on the G431/B-G431B-ESC I can have
But not on the STSPIN. Is that what you would expect? Or is this the toolkit generating the configuration differently for SPIN and G431 or just different pin availability?
I presume that either way I should remove the earlier 'fix' from the config files as it is not valid.
Thanks
Clive
2025-08-28 2:33 AM
Hello @Clive_S,
The limitation is not the current sensing topology, the ThreeShunt_RawCurrents_Differential_InternalGain topology is available on the STM32G4 series.
The limitation is on the OPAMPx input selection, which must be INM0, as on the B-G431B-ESC.
On the EVLSPIN32G4-ACT board, the VSHUNT2N signal is connected to the PC5 pin (STSPIN/STM32G4).
The PC5 pin only accesses the OPAMPx_VINM1 input, as specified in the RM0440 document.
The INM0 limitation in the ConnectionParameters.json
file is valid.
2025-08-28 5:14 AM
Thanks for your patience @GMA I think I now understand.
The critical bit of information I had not spotted was RM0440 Section 25.3.4
Most places just refer to VINM but that section is more specific, OPAMP2_VINM options are
PA5 (VINM0)
PC5 (VINM1)
So the issue is not the STSPIN but the way it has been wired up on the EVLSPIN board. So provided I wired up the STSPIN in the same way as the ST32G431, which it appears I could do, it will work the same.
Thus are the perils of design by wizard. Even if it correctly tells you it doesn't work, it is hard to work out why.
Thanks
Clive