cancel
Showing results for 
Search instead for 
Did you mean: 

CSConnect Errors When Generating Custom Project

reesed13
Associate II

Hello,

I am working on a custom FOC Inverter Board.  I am trying to assign the pins for current sensing, but I keep getting warnings.  I am using an STM32G431CBT6 MCU, and I completed all the other pin assignments without issue.  Here is the Current Sensing information:

"Three Shunt AmplifiedCurrents using External Op-Amps"

CURRENT_AMPL_U -> Assigned to PB14 ADC1_IN5
CURRENT_AMPL_V -> Assigned to PB12 ADC1_IN11
CURRENT_AMPL_W -> Assigned to PB11 ADC12_IN14


It looks OK in the board designer application with no warnings, but when I try to generate the project in Motor Control Workbench, it gives me the following errors: 

reesed13_0-1779544074338.png

I cannot find any documentation on the list of warnings/errors.  How do I correct this?  Or can it be ignored?

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @reesed13,

If the MC Workbench tool does not report an error, the current sensing topology is permitted.

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

View solution in original post

6 REPLIES 6
GMA
ST Employee

Hello @reesed13,

You can proceed with the current board description and verify the available current sensing topologies.

Refer to the supported current sensing topologies in the STM32G4 structure of the ConnectionParameters.json file available in the MC_SDK_x.x.x\Utilities\PC_Software\STMCWB\assets directory.

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

@GMA , Thank you for assisting,

1. I may be a little confused, are you confirming that I can ignore the warnings and my board should work after I have it manufactured?


2. I looked in the JSON, but it is a little unclear what I am looking for.  I do see that the STM32G4 section lists "ThreeShunt_RawCurrents_SingleEnded_ExternalGain" which sounds like what I am doing..

I included the relevant portion of the json for anyone else who sees this:

"mcus": {
    "STM32G4":{
  "MCUParamVersion": 1.0,
      "PhaseVoltageGeneration": {
        "DrivingHighAndLowSides":{
"ips": "(TIM1|TIM8|TIM20)_(.*)"
},
        "DrivingHighSidesAndThreeEnables":{ 
"ips": "(TIM1|TIM8|TIM20)_(.*)"
}
      },   
  "PhaseVoltageSensing" : {
  "ThreePhaseVoltageDividersFiltered": {
  "ADCSignals":[
["VOLTAGE_DIV_FILT_U", "VOLTAGE_DIV_FILT_V", "VOLTAGE_DIV_FILT_W"], 
["(ADC[0-9]*)_IN(?!N)"]
],   
  "swVariant": {
"DualADCsNoSharedPhase" :{
   "ips": ["All"]
},
"TripleADCs": {
   "ips": ["All"]
                 }
  }
  }
  },
      "CurrentSensing": {
          "ThreeShunt_AmplifiedCurrents": {
  "ADCSignals":[
["CURRENT_AMPL_U", "CURRENT_AMPL_V", "CURRENT_AMPL_W"], 
["(ADC[0-9]*)_IN(?!N)"]
],
              "swVariant": {
                  "DualADCs" :{
                      "sharedPhase": ["CURRENT_AMPL_V"], 
                      "ips": ["All"]
                  },
  "DualADCsNoSharedPhase" :{
  "ips": ["All"]
  },
"TripleADCs": {
   "ips": ["All"]
                 },
                  "SingleADC":{
                 }  
              }
          },
          "ThreeShunt_RawCurrents_SingleEnded_ExternalGain": {
              "OpampSignals": [
                  [ "CURRENT_SHUNT_?P", "_VINP" ],
                  [ ".*CURRENT_AMPLN_?", "_VINM" ],
                  [ ".*CURRENT_AMPL_?", "_VOUT"]
              ],
              "swVariant":{
                  "DualOPAMPs":{
                    "sharedPhase": [ "CURRENT_AMPL_V" ],
                    "ips": [ "OPAMP1,OPAMP2", "OPAMP3,OPAMP4" ],
                    "ADCVariants": {
                              "OPDualADCs": {}                        
                          }
                  }
              }
          },
          "ThreeShunt_RawCurrents_SingleEnded_InternalGain":{
              "OpampSignals": [ [ "CURRENT_SHUNT_?P", "_VINP" ] ],
              "swVariant": {
                  "DualOPAMPs":{
                      "sharedPhase": [ "CURRENT_AMPL_V" ],
                      "ips": [ "OPAMP1,OPAMP2", "OPAMP3,OPAMP4" ],
                      "ADCVariants": {
                              "OPDualADCs":{}
                      }
                  }
              }    
          },
          "ThreeShunt_RawCurrents_Differential_InternalGain": {
              "OpampSignals": [
                  [ "CURRENT_SHUNT_?P", "_VINP" ],
                  [ "CURRENT_SHUNT_?N", "_VINM0" ]
              ],
              "swVariant": {
                  "TripleOPAMPs": {
                      "ips": [ "OPAMP1,OPAMP2,OPAMP3" ],
                      "ADCVariants": {
                          "DualADCs": {
                              "sharedPhase": [ "OPAMP3_OUT" ],
                              "ips": [ "ADC1,ADC2" ]
                          }
                      }
                  }
              }
          },
          "ThreeShunt_RawCurrents_Differential_ExternalGain_FilteredADCInput": {
              "OpampSignals": [
                  [ "CURRENT_SHUNT_?P", "_VINP" ],
                  [ "CURRENT_SHUNT_?N", "_VINM" ],
  [ ".*CURRENT_AMPL_?", "_VOUT"]
],
"ADCSignals":
  [[ ".*CURRENT_FILT_?", "(ADC[0-9]*)_IN(?!N)"]],
              "swVariant": {
                  "TripleOPAMPs": {
                      "ips": [ "All" ],
                      "ADCVariants": {
                          "DualADCs": {
                              "sharedPhase": [ "All" ],
                              "ips": [ "All" ]
                          },
  "DualADCsNoSharedPhase" :{
  "ips": ["All"]
  },
  "TripleADCs": {
  "ips": ["All"]
                          }
                      }
                  }
              }
          },   

 

Hello @reesed13,

Proceed with project generation.
After the project is fully generated, verify in the current sensing tab of MC Workbench that the "three-shunt, raw currents, single-ended internal op amp with external gain hardware variant" (also described in the relevant chapter here) is available.

In the JSON file, the variant is referenced as "ThreeShunt_RawCurrents_SingleEnded_ExternalGain".
The following points are specified:

  • Inputs and outputs are connected as described.
  • Dual op amp must be used, and the V phase must be shared. Op amp 1/2 or op amp 3/4 combinations are available.

Example with CURRENT_SHUNT_VP connected to PA7.

GMA_1-1779714164148.png

 

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

@GMA Ok, I understand the board creation process better now, thank you.  I can see now I misunderstood the selection process for current sensing.  Is this an allowable ADC configuration for the STM32G431 series of MCUs?

reesed13_0-1779724930174.png

 

Hello @reesed13,

If the MC Workbench tool does not report an error, the current sensing topology is permitted.

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

@GMA Thank you so much for the help, I will proceed with my current design as you have suggested.