Skip to main content
Associate III
January 3, 2024
Solved

MCSDK inverter

  • January 3, 2024
  • 2 replies
  • 2322 views

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

This topic has been closed for replies.
Best answer by cedric H

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

2 replies

cedric H
Technical Moderator
January 5, 2024

Hello @iskan ,

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

Regards

Cedric

iskanAuthor
Associate III
January 6, 2024
{
 "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
 }
 ]
 }
 }
 ]
 }
 ]
}
cedric H
Technical Moderator
January 9, 2024

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

iskanAuthor
Associate III
January 10, 2024

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.