cancel
Showing results for 
Search instead for 
Did you mean: 

STEVAL-SPIN3204 does not connect to Motor control Workbench

APayo.1
Associate II

Hello,

I've got problems to connect with the STEVAL-SPIN3204 Eval board.

I tried all the Baudrates which are available.

the Stlink shows up normally in the device manager.

Or does the STEVAL-SPIN3204 does not work with the Motor control workbench?

Are there some way to test the hardware or did i Forgot something?

1 ACCEPTED SOLUTION

Accepted Solutions
Dario CUCCHI
Senior II

Hi @APayo.1​ , Hi @YLiu.4​ ,

Let me provide a more detailed explanation about STEVAL-SPIN3204 and the MCSDK.

This board does not support the FOC algorithm, but just the six-step algorithm.

So the MCSDK cannot be used to generate a FOC project.

Instead, the MCSDK can be used to load a specific example project based on the six step algorithm.

The project can be found in the main page: “Six-step drive with STSPIN3204�?.

Loading this project, a warning message appears together with a "readme.txt" file, which explains step by step how to create the six step project.

I try to summarize the most important steps here below:

Save the project in a new folder, whichever you want. The important thing is that is must be a brand new folder without any previous project inside.

Some files will be created in addition to the .stmcx project: one of these is the “extras.wb_def�?.

If you want to use the monitor of the MCSDK, open the “extras.wb_def�? file with a text editor.

Ensure that the value of SERIAL_COMMUNICATION key Is set to "true" (should be the default value).

Save and close this file, go back to the MCSDK and click to generate button in the MCSDK.

0693W000004GrPvQAK.png

Important: in the generation window that will open, click on the UPDATE button, not on GENERATE.

IAR EWARM 8 or Keil uVision 5 Are the IDE supported, so this is your case.

Once the project is created, compile and download the firmware in the board.

Now, you can run the motor using both USER1 button on the board or using the start/stop button.

The COM port should be the one connected by the system while the baud rate to be selected is 115200 if the project (sorry, forget about the digital IO block previously mentioned)

If you need to change other parameters, for example the pole pairs of the motor, you can do it directly in the genearted C code.

Check the files “Motor_Configuration.h�? and 6step_conf.h.

To summarize, the MCSDK can be used with the STEVAL-SPIN3204 with some limitations:

  • It is not possible to create a FOC porject, the six-step only can be loaded
  • The MCSDK can be used to generate the source code, NOT to modify the parameters (acts directly on the code, if you want to do that)
  • The MCSDK can be used to send simple commands (a reduced set of functions are supported)

Let em add one last remark: there is another way to communicate with the board, that is using a command line terminal sending strings on the COM port.

This option uses another protocol and has different commands.

If you are interested, I can discuss more about this alternative method.

I hope this explanation can help you.

Let me know if you can connect to the board and run the motor.

All the best !

View solution in original post

7 REPLIES 7
Dario CUCCHI
Senior II

Hi @APayo.1​ ,

the baudrate to be used is the same value that you can find clicking the "digital IO" block, and looking for the Serial communication parameters.

0693W000004GTTZQA4.png

Let me ask you some question to better understand your issue.

I suppose you are starting from an existing project, correct ? Have you modified some parameters ?

The generation of the code and the firmware download procedure have been successful ?

Which kind of IDE are you using to program the board ?

YLiu.4
Associate

I also have the same question as he did.

I started from an existing project, correct ,and this time I didn't modified any parameters.

The generation of the code and the firmware download procedure have been successful ?

Yes, they're all successfully complete.

I've check the baudrate in the "digital IO" block, but it still don't work.

I used Keil uvision5 as my IDE.

Dario CUCCHI
Senior II

Hi @APayo.1​ , Hi @YLiu.4​ ,

Let me provide a more detailed explanation about STEVAL-SPIN3204 and the MCSDK.

This board does not support the FOC algorithm, but just the six-step algorithm.

So the MCSDK cannot be used to generate a FOC project.

Instead, the MCSDK can be used to load a specific example project based on the six step algorithm.

The project can be found in the main page: “Six-step drive with STSPIN3204�?.

Loading this project, a warning message appears together with a "readme.txt" file, which explains step by step how to create the six step project.

I try to summarize the most important steps here below:

Save the project in a new folder, whichever you want. The important thing is that is must be a brand new folder without any previous project inside.

Some files will be created in addition to the .stmcx project: one of these is the “extras.wb_def�?.

If you want to use the monitor of the MCSDK, open the “extras.wb_def�? file with a text editor.

Ensure that the value of SERIAL_COMMUNICATION key Is set to "true" (should be the default value).

Save and close this file, go back to the MCSDK and click to generate button in the MCSDK.

0693W000004GrPvQAK.png

Important: in the generation window that will open, click on the UPDATE button, not on GENERATE.

IAR EWARM 8 or Keil uVision 5 Are the IDE supported, so this is your case.

Once the project is created, compile and download the firmware in the board.

Now, you can run the motor using both USER1 button on the board or using the start/stop button.

The COM port should be the one connected by the system while the baud rate to be selected is 115200 if the project (sorry, forget about the digital IO block previously mentioned)

If you need to change other parameters, for example the pole pairs of the motor, you can do it directly in the genearted C code.

Check the files “Motor_Configuration.h�? and 6step_conf.h.

To summarize, the MCSDK can be used with the STEVAL-SPIN3204 with some limitations:

  • It is not possible to create a FOC porject, the six-step only can be loaded
  • The MCSDK can be used to generate the source code, NOT to modify the parameters (acts directly on the code, if you want to do that)
  • The MCSDK can be used to send simple commands (a reduced set of functions are supported)

Let em add one last remark: there is another way to communicate with the board, that is using a command line terminal sending strings on the COM port.

This option uses another protocol and has different commands.

If you are interested, I can discuss more about this alternative method.

I hope this explanation can help you.

Let me know if you can connect to the board and run the motor.

All the best !

Dario CUCCHI
Senior II

Hi @APayo.1​ , did my explanation was useful for you ? Are the communication issue fixed ?

If so, consider to mark the answer as best: it will help other community members with the same question to find more easily the answer.

Thank You !

APayo.1
Associate II

Hello Dario,

Sorry for my late Reply, i was stuck with some Project with higher priority in my company.

Unfortunately not i've tried till yet i couldn't get the board to work.

But Maybe i'm wrong by the way to program and use the board. I've tried to use the MCSDK

The files has been generated as you can see in the Picture.

And i would like to use the STM32CUBE IDE or could,

you tell me why the most People using the Keil IDE for ST ARM Microcontrollers?

And is there a detailed description like an step by step guide with this board and also for the STEVAL-ESC002V1.

hopefully you can help me.

And Thank you for your support till now.

Best regards Alex

Dario CUCCHI
Senior II

Hello Alex

Never mind for the late reply and of course take your time 😊

In general there is no preferred IDE: MCSDK supports IAR, Keil and the STM32CubeIDE and TrueSTUDIO.

However..... for the specific project of the six-step for STEVAL-SPIN3204, only the IAR EWARM 8 or Keil uVision 5 are supported.

This limitation is because this example project was initially developed using these two IDE versions.

You have to select one of the previous two IDE, otherwise you can have a code generated, but it does not run properly.

My suggestion is to delete what have already been generated and start from scratch opening again the example project from MCSDK.

This is because the example updates the present code and some previous parts of code still remain in the updated code.

Try to follow exactly, step by step, what described in the “readme.txt�? file.

This file will open automatically when you load the project.

If something is not clear in this file, please come back and ask.

For the STEVAL-ESC002V1, you can find an example here.

The example is not based on the MCSDK, it is a firmware example with a user manual, describing how to use the firmware.

Have a nice day !

Laurent Ca...
Lead II

The question has been moved from the "STM32 Motor Control" section to the "Motor Control Hardware" section (the question is not about the STM32 MC SDK). 

Best regards