Skip to main content
Associate
August 20, 2023
Question

MCSDK 6 board config

  • August 20, 2023
  • 4 replies
  • 2325 views

Using the SDK I am basing a new system on the EVSPIN32G4. After selecting the inverter, and motor, I am then taken into the parameter configuration of the motor driver.

According to the boards manager the EVSPIN32G4 has multiple configurations available for single ended and differential current shunt configurations, plus using 3 op-amps, one for each current shunt etc, for the most system flexibility. Yet in the parameter configuration section of the SDK, when selecting this board, you have no control over the configuration of the current shunts and are locked into a single ended, triple shunt, system using only two op-amps. You can select to use either internal (PGA), or external resistor configurations but that's it. Moreover a triple shunt, triple op-amp, with external resistors, is the default hardware configuration for this board, so selecting something other than this (such as using the PGAs) should require hardware modifications but the SDK doesn't think this is necessary.

This doesn't seem to make any sense.

Additionally, with sensor-less control, the MCU should require voltage feedback from the three driven phases. These are already a part of the base hardware configuration for the EVSPIN32G4 board but there's no mention of this requirement, or input pin configuration, within the SDK.

Is there something I am doing wrong here to enable the configuration of additional parameters?

Many thanks,

Matt.

    This topic has been closed for replies.

    4 replies

    Gael A
    ST Employee
    August 31, 2023

    Hello MotorMatt,

    Concerning the possibility to do single-shunt current sensing, it is a feature that should be available starting next release which should come up soon.

    However, there is another explanation why only 2-OPAMPs single-ended is available.
    Firstly, differential sensing can't be done for 2-OPAMPs configurations, as the sensed shunt is changing so it is impossible to choose a shunt to connect the ground to. For example with EVSPIN32G4, U-Shunt Negative would be connected to A3, WN to C5 and we wouldn't know where to put VN.

    Secondly, as you mentioned, the Workbench does not allow 3-OPAMPs configuration either. This issue comes from ADC phases. Looking at the available ADC channels of each OPAMP via CubeMX, we can see that : OPAMP1 can only be connected to ADC1 channel 3 (PA2), OPAMP2 only to ADC2 channel 3 (PA6), and OPAMP3 only to ADC1 channel 12 (PB1). Neither of the 3 OPAMPs have the ability to be connected to 2 different ADCs, which is needed for phase sharing. We can't use only one ADC either as OPAMP2 can only be connected to ADC2 and not ADC1.

    Next, using the PGA does not require any hardware modification, taking the U-phase as an example, PA3 isn't used anymore, and PA2 is the output of the OPAMP. Be it Internal or External, hardware needs no modifications.

    Finally, concerning Voltage Feedback, it is only useful for 6-Step algorithm, not FOC.

    If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.Hope this will help,Gaël A.
    JKolj.1
    Associate
    September 1, 2023

    Then why not sample with 3 OpAmp, external network or PGA, with 3 ADC? This should be doable hardware -wise. It allows differential measurement as well. At least it's doable with G474 and such. Are you planning to add MCSDK support for this kind of topology?

    Gael A
    ST Employee
    September 4, 2023

    Hello KKolj.1,

    It should be possible to use such a configuration indeed. However, as I stated in my previous post, in the case of the EVSPIN32G4, each OPAMP have only one ADC they can access to : OPAMP1 -> ADC1 ; OPAMP2 -> ADC2 ; OPAMP3 -> ADC1.
    So we can't do 3-ADCs configuration, OPAMP3 needs to access another ADC than ADC1.

    Nevertheless, 3-ADCs configurations are not supported by our Firmware and it is currently not on our roadmap. It will not be added anytime, sorry.

    If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.Hope this will help,Gaël A.
    JKolj.1
    Associate
    September 4, 2023

    Thank you for your reply. That's very unfortunate. I checked as well - and yes it seems that the EVSPIN32G4 lacks the added ADC, but more capable G4 variants would benefit from 3-ADC measurement. Isn't it the only way to do external gain network, simultaneous, differential current measurement with G4 processor family? I see it as a "best" way to perform current measurement with low side shunts. Please educate me if I am wrong. Always happy to learn.

    Gael A
    ST Employee
    September 4, 2023

    Hello JKolj.1,

    Indeed, 3-ADC measurement is the only way for such a configuration.
    I take this opportunity to correct my last post : 3-ADC configurations may be included in an upcoming release ;)

    If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.Hope this will help,Gaël A.