cancel
Showing results for 
Search instead for 
Did you mean: 

2 Motors with STM32H755ZI

Zeno
Associate II

Hi, 

I managed to create a custom inverter board using STMC Board Designer which is basically 1 Nucleo-H755ZI-Q inverter and 2 times a IHM08M1 power board(see Other post about creating bridge ) . One of the 2 power boards is therefore connected to other pins of the Nucleo-H755ZI-Q in order for me to drive 2 motors independently. (included board below)

That all worked and I'm able to create a STMC Workbench project (included below) and configure the encoder, stages, etc. 

All goes well until I want to generate the code, from what I understand is that there are some bindings missing in the foc_assign.ftl templates. There's no support for M2_ADC listed which causes several files to be incomplete (mc_tasks.c and stm32h7xx_mc_it.c as far as I can tell). I've added the files with fault codes aswell. 

 

Could you guys help me create the correct .ftl files in order for me to generate the project for 2 motors for a STM32H755 MCU using the workbench? 

1 REPLY 1
Zeno
Associate II

Managed to change some of the .ftl and .xml files in order to get the generation working properly. Could you guys check and verify if all is setup correctly and this would work? 

  • MotorControl_Configs.xml at ./MCSDK_v6.3.2-Full/MotorControl under the section for "stm32h7xx_mc_foc_it.c.ftl"
    • <Argument GenericType="simple" Name="M2_CS_ADC_PHASE_SHARED" />
    • <Argument GenericType="simple" Name="M2_CS_ADC_U" />
    • <Argument GenericType="simple" Name="M2_CS_ADC_V" />
  • stm32h7xx_mc_foc_it.c.ftl at ./MCSDK_v6.3.2-Full/MotorControl/templates
    • Added stuff for M2 similar to M1 using ChatGPT and reading it
    • Interrupt handling for current sensing topology
    • Brake Input 2 for M2 (BKIN2), BKIN for M1
    • DMA handler for Motor 2
  • foc_assign.ftl at ./MCSDK_v6.3.2-Full/MotorControl/ftl
    • Added stuff for M2 similar to M1, namely the current sensing topologies for STMH7