cancel
Showing results for 
Search instead for 
Did you mean: 

FOC Code Generation from MC Workbench v5.4.8 for Nucleo-144 stm32 F767ZI

Noman-Aviacell
Associate II

I want to generate a code for STM32F767ZI but this MCU is not supported in the STM Motor Control workbench V5.4.8.

Available STM32F7 family MCUs in Workbench are STM32F746 and STM32F769
I have generated code for the STM32F746 and flashed that code into STM32F767ZI but it is not working.

From some online help, it was found that both MCUs are the same and one can flash the code interchangeably into controllers. 

Questions:
1- Is this possible to flash the code of STM32F746 into STM32F767ZI? If yes, why my code is not working even though I flashed the code into STM32F767ZI, still, I am still unable to build a communication between the Monitor window of Workbench. The COM port is not detecting. 

2- if not possible, then should I have to buy a supported microcontroller?

Thanks and Regards

Noman

1 ACCEPTED SOLUTION

Accepted Solutions
cedric H
ST Employee

Hello @Noman-Aviacell,

Unfortunately, the F7 series support is currently limited to the two parts you mentioned. My recommended way would be to generate your project based on STM32F746 and to import this cubeMX IOC file into a STM32F767ZI empty project. To do so, once your project is generated and your motor control IOC file is generated, open cubeMX and open a new project starting from MCU selector. Select your MCU (STM32F767ZI in your case) without any initialization. Once your empty project is generated, you can import your motor control project. To do this, left click on File menu and select "Import Project". Check that the mapping between your original project and F767ZI is correct, (most of the time, clock tree and ADC frequencies needs to be reviewed carefully). Once it is Ok, you can click on generate, and it will generate your motor control project for the right MCU. 

Note that the import feature from cubeMX is somehow experimental and could require some tunning...

Hope it helps.

Regards

Cedric

 

View solution in original post

4 REPLIES 4
cedric H
ST Employee

Hello @Noman-Aviacell,

Unfortunately, the F7 series support is currently limited to the two parts you mentioned. My recommended way would be to generate your project based on STM32F746 and to import this cubeMX IOC file into a STM32F767ZI empty project. To do so, once your project is generated and your motor control IOC file is generated, open cubeMX and open a new project starting from MCU selector. Select your MCU (STM32F767ZI in your case) without any initialization. Once your empty project is generated, you can import your motor control project. To do this, left click on File menu and select "Import Project". Check that the mapping between your original project and F767ZI is correct, (most of the time, clock tree and ADC frequencies needs to be reviewed carefully). Once it is Ok, you can click on generate, and it will generate your motor control project for the right MCU. 

Note that the import feature from cubeMX is somehow experimental and could require some tunning...

Hope it helps.

Regards

Cedric

 

Noman-Aviacell
Associate II

After following the procedure you mentioned and build the project in STM CubeIDE; GPIO, ADC, timers, Communication, and motor control initializations were not present in the generated main.c file. I have to add those initializations by myself. 

the main() function was missing. I have flashed the firmware, generated for STM32F767ZI, after adding the main function with peripherals initializations.

cedric H
ST Employee

Hello @Noman-Aviacell,

Could you send a screenshot of the result of your import project ?

It sounds like the import functions has failed as nothing is imported. If motorcontrol is not imported, there is no chance to have a successful project, even if you initialize the various peripherals yourself. 

Regards

Cedric

Noman-Aviacell
Associate II

I have made some mistakes in initilizations. Now, code is generated and flashed properly.