cancel
Showing results for 
Search instead for 
Did you mean: 

MCSDK inverter

iskan
Associate III

I'm using mcsdk and want to create an inverter file based on STM32G070CBTx, but when generating the project, it tells me that my selected hardware is not compatible with the algorithm

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @iskan ,

Your issue is line 144. The actual name of the PC14 pin is "PC14-OSC32_IN (PC14)".

I modified this section as follow :

"OC_TRIGGER": [
{
"name": "PC14-OSC32_IN (PC14)",
"help": "CN10.14. Factory default. Solder R73",
"cost": 0
}
]

With this version updated, I was able to load your project, generate and compile the binary.

For your information, the genuine name is the one from the name section of the json description of the MCU.

In your case, you will find the following section line 1144 of the file STM32G071RBTx.json:

{

"name" : "PC14-OSC32_IN (PC14)",
"position" : "4",
"signals" : [ "GPIO_Analog", "GPIO_EXTI14", "GPIO_Input", "GPIO_Output", "RCC_OSC32_IN", "TIM1_BK2" ]
},

Regards

Cedric

View solution in original post

7 REPLIES 7
cedric H
ST Employee

Hello @iskan ,

Could you please attach your board description. I will have a look on it and check what the issue is.

Regards

Cedric

{
  "type": "inverter",
  "name": "tricycle-TEST",
  "descVersion": 4,
  "contentVersion": "1.0",
  "PN": "tricycle-TEST",
  "longDescription": "Incorrect temperature protection",
  "shortDescription": "Incorrect temperature protection",
  "link": "https://www.st.com/en/evaluation-tools/steval-ihm042v1.html",

  "mcu": "STM32G071RBTx",
  "clockSource": "internal_osc",
  "clockFrequency": 64,
  "motorDrives": [
    {
      "name": "M1",
      "maxRatedVoltage": 100,
      "minRatedVoltage": 48,
      "maxRatedCurrent": 60,
      "features": [
        {
          "name": "CurrentSensing",
          "type": "CurrentSensing",
          "tRise": 1000,
            "hwVariants": [
            {
              "type": "SingleShunt_AmplifiedCurrents",
              "help": "Soldering the pins SENS2 to Vshunt_2 of connector J5 and the pins SENS3 to Vshunt_3 of the connector J6",
              "signals": {
                "CURRENT_AMPL": [
                  {
                    "name": "PA1",
                    "help": "CN7.35. Factory default. Solder R47",
                    "cost": 10
                  }
                ]
              },
              "shuntResistor": 0.0025,
              "amplifyingNetworkImax": 66,
              "amplifyingNetworkVm": 3.3,
              "amplifyingNetworkPrating": 4,
              "offsetNetworkAttenuation": 1,
              "opAmpGain": 10,
              "polarizationOffset": 1.65
            }
          ]
        },
        {
          "name": "PhaseVoltageGeneration",
          "type": "PhaseVoltageGeneration",
          "driverName": "L6230",
          "driverPN": "L6230",
          "minDeadTime": 1000,
          "maxSwitchingFreq": 100,
          "tNoise": 1000,
          "hwVariants": [
            {
              "type": "DrivingHighAndLowSides",
              "help": "How to enable this variant",
              "signals": {
                "PWM_CHU_H": [
                  {
                    "name": "PA8",
                    "help": "CN10.23. Factory default. Solder R56.",
                    "cost": 0
                  }
                ],
                "PWM_CHV_H": [
                  {
                    "name": "PA9",
                    "help": "CN10.21. Factory default. Solder R64.",
                    "cost": 0
                  }
                ],
                "PWM_CHW_H": [
                  {
                    "name": "PA10",
                    "help": "CN10.33. Factory default. Solder R70.",
                    "cost": 0
                  }
                ],
                "PWM_CHU_L": [
                  {
                    "name": "PA7",
                    "help": "CN10.15. Factory Default. Solder R58",
                    "cost": 0
                  }
                ],
                "PWM_CHV_L": [
                  {
                    "name": "PB0",
                    "help": "CN7.34. Factory default. Solder R67.",
                    "cost": 0
                  }
                ],
                "PWM_CHW_L": [
                  {
                    "name": "PB15",
                    "help": "CN10.24. Factory default. Solder R72.",
                    "cost": 0
                  }
                ]
              },
              "highSideSwitchesDrivingPolarity": "Active high",
              "lowSideSwitchesDrivingPolarity": "Active low",
              "deadTime": 2500
            }
          ]
        },
        {
          "name": "VBusSensing",
          "type": "VBusSensing",
          "busVoltageDivider": 32.33,
          "hwVariants": [
            {
              "type": "VBusSensing",
              "help": "",
              "signals": {
                "VBUS": [
                  {
                    "name": "PA0",
                    "help": "",
                    "cost": 0
                  }
                ]
              },
              "busVoltageDivider": 32.33,
              "busVoltageDividerR1": 94,
              "busVoltageDividerR2": 3,
              "busVoltageDividerR3": null
            }
          ]
        },
        {
          "name": "OverCurrentProtection",
          "type": "OverCurrentProtection",
          "hwVariants": [
            {
              "type": "OnPowerStageOCP",
              "help": "How to enable this variant",
              "signals": {
                "OC_TRIGGER": [
                  {
                    "name": "PC14",
                    "help": "CN10.14. Factory default. Solder R73",
                    "cost": 0
                  }
                ]
              },
              "OCComparatorThreshold": 0.3,
              "OCNetworkOffset": 0,
              "OCNetworkGain": 0.01,
              "OCThreshold": 480,
              "OCSignalPolarity": "Active low"
            }
          ]
        }
      ]
    }
  ],
  "features": [
    {
      "name": "SerialPortCommunication",
      "type": "SerialPortCommunication",
      "hwVariants": [
        {
          "type": "Uart2WiresCommunication",
          "help": "",
          "signals": {
            "UART_TX": [
              {
                "name": "PA2",
                "help": "",
                "cost": 0
              }
            ],
            "UART_RX": [
              {
                "name": "PA3",
                "help": "",
                "cost": 0
              }
            ]
          }
        }
      ]
    }
  ]
}

thank you very much indeed

Hello @iskan ,

Your issue is line 144. The actual name of the PC14 pin is "PC14-OSC32_IN (PC14)".

I modified this section as follow :

"OC_TRIGGER": [
{
"name": "PC14-OSC32_IN (PC14)",
"help": "CN10.14. Factory default. Solder R73",
"cost": 0
}
]

With this version updated, I was able to load your project, generate and compile the binary.

For your information, the genuine name is the one from the name section of the json description of the MCU.

In your case, you will find the following section line 1144 of the file STM32G071RBTx.json:

{

"name" : "PC14-OSC32_IN (PC14)",
"position" : "4",
"signals" : [ "GPIO_Analog", "GPIO_EXTI14", "GPIO_Input", "GPIO_Output", "RCC_OSC32_IN", "TIM1_BK2" ]
},

Regards

Cedric

Thank you very much. I would also like to ask why I couldn't find the inverter file when creating a project using G030C8Tx.

cedric H
ST Employee

Hi,

No obvious reason. G030 series is now supported from MCSDK 6.2.1.

If pins are aligned with pins name coming from mcu json file, then I propose you to attach your description in this thread, and I will check it.

Regards

Cedric

Yes, the version of mcsdk I'm using is 6.2.1, and the inverter file I'm using is the same as the one for the G071 mentioned above, except that I've changed the "mcu": "STM32G071RBTx" to "mcu": "STM32G030C8Tx", and I'm not sure if I'm going to have any problems doing that, so I'd like to ask you about it.