Skip to main content
Associate
October 13, 2023
Solved

I need FOC code for STM32 Nucleo-F302R8-IHM07M1

  • October 13, 2023
  • 9 replies
  • 3603 views

I try implementing FOC for Bull Running BLDC motor with F302R8 Nucleo board and IHM07MI expansion board.Help me in this regard. 

    This topic has been closed for replies.
    Best answer by FouadB

    Hello,

    Please use MCSDK version 6.2 to obtain the complete FOC code with the desired configuration.

    You can choose the Bull Running BLDC motor + control board Nucleo F302R8 + power board IHM07M1.

    An example of a workbench file based on this configuration is attached for your reference.

    Best regards 

    9 replies

    FouadB
    FouadBBest answer
    ST Employee
    October 13, 2023

    Hello,

    Please use MCSDK version 6.2 to obtain the complete FOC code with the desired configuration.

    You can choose the Bull Running BLDC motor + control board Nucleo F302R8 + power board IHM07M1.

    An example of a workbench file based on this configuration is attached for your reference.

    Best regards 

    If you agree with my answer, please accept it by clicking on 'Accept as solution'.""
    Associate
    October 16, 2023

    HI, thank you for the swift reply. I downloaded the code in Keil environment, but it is having some fatal error. How to rectify the fatal error.

    Nandhini3189_0-1697438646804.png

     

    FouadB
    ST Employee
    October 16, 2023

    Hello,

    The issue reported by your linker may be caused by the version of MDK-Lite edition being used. Can you please confirm if this is the case?

    If confirmed, a program that generates code and data exceeding 32 Kbytes will fail to compile, assemble, or link.

    Would you be able to try generating your project using ST STM32CubeIDE or using a suitable version of Keil?

    Best regards

    If you agree with my answer, please accept it by clicking on 'Accept as solution'.""
    Associate
    October 16, 2023

    Hi thank you for the reply. I tried generating the code with STM32cubeIDE, it runs with no error and also got downloaded into the board, I also changed the code for Start/stop pin (PC13) in main.c by seeing in the YouTube, I also tried motor profiling before downloading the code, but my motor is not running. Please give me solution in this regard.

    FouadB
    ST Employee
    October 16, 2023

    Hello,

    It's challenging to provide a solution without any data.

    Can you please use the Motor Pilot GUI to start your motor? You might have to adjust your startup parameters (in GUI: Configuration/Advanced Configuration/Rev-up).

    Best regards

    If you agree with my answer, please accept it by clicking on 'Accept as solution'.""
    Associate
    October 17, 2023

    Hi,thank you. When I am trying to connect with GUI Iam facing the following issue. Although my communication port and baud rate are correct.

    Nandhini3189_0-1697525438535.png

     

    FouadB
    ST Employee
    October 17, 2023

    Hello, could you please use the MC Pilot version launch from Workbench:

    FouadB_0-1697530567884.png

    and set appropriate baud rate according to the value set here:

    FouadB_1-1697530704020.png

    Please also check the port com by unplugging and plugging in your board.

    Best regards

    If you agree with my answer, please accept it by clicking on 'Accept as solution'.""
    Associate
    October 17, 2023

    Hi thank you.But my issue still not resolved.I tried in all the ways you have mentioned but still not connecting. Also tell me about the jumper connections in control and power board whether it may affect the connection.

    Associate
    October 17, 2023

    Hi, also tell the ways to run the motor without user interface.

    FouadB
    ST Employee
    October 17, 2023

    Hi,

    Using the MC Pilot GUI can greatly assist you in finalizing your tuning.
    However, if you need to start the motor without the GUI, you can do so by pressing the Start button (blue button) on the Nucleo control board.
    Alternatively, you can develop your own application and use the APIs defined in mc_api.c to start the motor (example: MC_StartMotor1()).

    Best regards

    If you agree with my answer, please accept it by clicking on 'Accept as solution'.""
    Associate
    October 18, 2023

    Hi, thank you for the support. The downloading issue got resolved and board connections also okay now, but my motor is not running it vibrates and firstly it runs one rotation and then vibrating.kindly help me in this regard. 

    Associate
    October 18, 2023

    Hi,it is showing the under voltage error although my power supply voltage is 12.5v. 

    FouadB
    ST Employee
    October 18, 2023

    Hello,

    Good to hear that your connection problem has been resolved.

    It appears that the issue you are currently facing is related to a startup problem.

    You may need to adjust the startup parameters and possibly the gains of your speed regulator.

    Please consult the attached document in chapter MC_SDK_6.2.0/Documentation/User Manual and refer to the "Firmware Errors" chapter for assistance in case of reported errors.

    Best regards

    If you agree with my answer, please accept it by clicking on 'Accept as solution'.""