cancel
Showing results for 
Search instead for 
Did you mean: 

How to run a BLDC using C-functions of mc_api.c

smiya.1
Associate

I tried to run a motor(BLDC).But, my motor doesn't run. 

I refered to this PDF to page 45~.

https://www.st.com/content/ccc/resource/technical/document/user_manual/group1/48/e6/91/f4/66/ea/48/a1/DM00490980/files/DM00490980.pdf/jcr:content/translations/en.DM00490980.pdf

I wrote a code. 

I use 

ESC : B-G431B-ESC1 

Motor Control Workbench 5.4.3

Motor Profiler 5.4.3

STM32CubeMX 5.6.1

STM32CubeIDE 1.5.0

This code is generated by Motor Control Workbench.

The setting is default.

I only added that code.

Please help me how to run my motor using API.

by the way , I checked to run using Motor Profiler or Motor Control Workbench. 

 while (1)
 
 {
 
 /* USER CODE END WHILE */
 
 /* USER CODE BEGIN 3 */
 
	 //MC_AcknowledgeFaultMotor1();
 
	 MC_ProgramSpeedRampMotor1(2000/6, 5000);
 
	 MC_StartMotor1();
 
 
 
	 HAL_Delay(10000);
 
 
 
	 MC_StopMotor1();
 
 
 
	 HAL_Delay(5000);
 
 
 
	 MC_ProgramSpeedRampMotor1(-2000/6, 5000);
 
 
 
	 MC_StartMotor1();
 
 
 
	 HAL_Delay(10000);
 
 
 
	 MC_StopMotor1();
 
 
 
 	 HAL_Delay(5000);
 
 }
 
 
 
 /* USER CODE END 3 */

3 REPLIES 3
Laurent Ca...
Lead II

Dear @Community member​ 

Sorry for the late answer.

Do you have still this problem to solve?

And just in case, if not, do not hesitate to share the final solution you found. Thanks by advance.

Best regards

Laurent Ca...

Laurent Ca...
Lead II

The question has been set only to the "STM32 Motor Control" topic (the question is only about the STM32 MC SDK). 

Best regards

fpaga.1
Associate II

Hi!

Could you share the solution of your problem? I have the same and I don't find any information about this.

Kind regards.

FRancisco