cancel
Showing results for 
Search instead for 
Did you mean: 

How to run an example of the six step algorithm on ST SPIN 3204?

77kk
Associate II

@Enrico Poli​ 

I downloaded all the software you sent me Motor Control SDK,Motor Control SDK,Motor Control SDK.

Then I opened in motor control workbench the six step sensorles exaple for st spin3204, and generated the code but then I do not know how to run it properly?

1 ACCEPTED SOLUTION

Accepted Solutions
Enrico Poli
ST Employee

Hi @77kk​,

After creating the example using the Motor Control Workbench, you should open the project using the IDE you selected during the generation process (e.g. STM32CubeIDE).

The next step is to compile the code and download it into the STSPIN32F0B through the STLINK programmer embedded on the board:

  1. Supply the board
  2. Connect the board to the PC through the USB cable
  3. STLINK is detected by the system. If drivers are missing, you can download them here
  4. After the STLINK is properly detected, you can use it for programming the STSPIN32F0B and debug the firmware

Please note that the STSPIN32F0 is supplied though the main supply voltage of the board, not the USB.

For this reason, connecting the board to PC before suppling it will return a "missing target" error.

The Motor Control Workbench also provide a GUI (MC Pilot) for controlling the motor using the Virtual COM interface of STSLINK.

For more information about the six-step example, you can refer to the dedicated User Manual: UM2916 MCSDK - 6-step firmware examples: insights of the firmware and how to customize it.

Good luck for your project.

Enrico

View solution in original post

3 REPLIES 3
Enrico Poli
ST Employee

Hi @77kk​,

After creating the example using the Motor Control Workbench, you should open the project using the IDE you selected during the generation process (e.g. STM32CubeIDE).

The next step is to compile the code and download it into the STSPIN32F0B through the STLINK programmer embedded on the board:

  1. Supply the board
  2. Connect the board to the PC through the USB cable
  3. STLINK is detected by the system. If drivers are missing, you can download them here
  4. After the STLINK is properly detected, you can use it for programming the STSPIN32F0B and debug the firmware

Please note that the STSPIN32F0 is supplied though the main supply voltage of the board, not the USB.

For this reason, connecting the board to PC before suppling it will return a "missing target" error.

The Motor Control Workbench also provide a GUI (MC Pilot) for controlling the motor using the Virtual COM interface of STSLINK.

For more information about the six-step example, you can refer to the dedicated User Manual: UM2916 MCSDK - 6-step firmware examples: insights of the firmware and how to customize it.

Good luck for your project.

Enrico

77kk
Associate II

Thanks for the answer @Enrico Poli​ .

I have a question, can I select the ST SPIN 3204 board in CUBEMX (I did not found it) and then implement my own six step algorithm, which I have to make for my degree.

Or can I only select the STM32F031C6 microcontroller and then configurate the pins by myself in CUBEMX and than generate the code ,and at the end implement the six step algorithm by myself in CUBE IDE?

Enrico Poli
ST Employee

Hi @77kk​ ,

You are right. If you want to start from scratch using CubeMX you should select STM32F031C6 as MCU.

My suggestion is to have a look to the IOC file generated by the Motor Control SDK as guidance for setting the peripherals.

Kind Regards

Enrico