cancel
Showing results for 
Search instead for 
Did you mean: 

Motor spin without Motor Pilot program

yourbryan
Associate II

Hello,

I'm very biginner.

By MCSDK6.2, I generated code and tried to spin 3 phases BLDC motor with code

" MC_PrgramSpeedRampMotor1(1725, 2000);" and

"MC_Startmotor1();"

I inserted these code and built and tried to run, but it didn't work.

The motor didn't spin, don't move at all.

What's the problems ?

화면 캡처 2023-12-11 145920.jpg

Also, Cube IDE showed me as below captured photo.

What's the reason, is there any problems ? 

화면 캡처 2023-12-11 145850.jpg

Best Regards,

Bryan

1 ACCEPTED SOLUTION

Accepted Solutions

Hello again yourbryan,

To match your baudrate to your board, you can check the main.c file. It should be located in the MX_USARTx_UART_INIT() function. The x stands for the used UART for MCP connection.

It seems to me that your project is not running. To run a project, please follow the instructions :
Right click on the project you want to run in the project explorer -> Either click on Debus As or Run As (in your case I would recommend Debug As) -> STM32 C/C++ Application -> On the newly opened window click Ok -> Update the STLink if need be -> Switch to Debug Perspective -> Click on Resume on the tool bar (or press F8).

You can also add breakpoints to your code by double-clicking on the small space at the left of the code line number (you can also press Ctrl+Shift+B after selecting the desired line of code). This allows your code to stop on the selected line. It is useful for debugging, though be careful as it completely stops your code, so you have to remove the breakpoint and press Resume if you wat your code to run again.

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

Hope this will help,
Gaël A.

View solution in original post

3 REPLIES 3
Gael A
ST Employee

Hello yourbryan,

This is strange, have you tried to run the MotorPilot first ? On a default project, have you tried running the motor using the button ? Is all of those don't work, then maybe the error lies somewhere else.

Also, can you tell me what EVSPIN you are using ?

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

Hope this will help,
Gaël A.

Hello, Gael.

 

I'm trying to spin motor with ST board EVSPIN32F0602S1.

I tried to spin motor with MotorPilot, but  The board  "EVSPIN32F0602S1" can't be connected correctly to Motor Pilot, in the all baud rate. I don't know what's the reasons. So I didn't test with Motor Pilot.
화면 캡처 2023-12-11 145950.jpg

Best Regards,

Bryan

Hello again yourbryan,

To match your baudrate to your board, you can check the main.c file. It should be located in the MX_USARTx_UART_INIT() function. The x stands for the used UART for MCP connection.

It seems to me that your project is not running. To run a project, please follow the instructions :
Right click on the project you want to run in the project explorer -> Either click on Debus As or Run As (in your case I would recommend Debug As) -> STM32 C/C++ Application -> On the newly opened window click Ok -> Update the STLink if need be -> Switch to Debug Perspective -> Click on Resume on the tool bar (or press F8).

You can also add breakpoints to your code by double-clicking on the small space at the left of the code line number (you can also press Ctrl+Shift+B after selecting the desired line of code). This allows your code to stop on the selected line. It is useful for debugging, though be careful as it completely stops your code, so you have to remove the breakpoint and press Resume if you wat your code to run again.

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

Hope this will help,
Gaël A.