Skip to main content
peter watt
Associate
October 24, 2017
Question

''Connection Failed!'' to STEVAL-SPIN3201

  • October 24, 2017
  • 3 replies
  • 1763 views
Posted on October 24, 2017 at 09:32

Hi Community,

I'm trying to talk to to STEVAL-SPIN3201 within the Monitor of ST Motor Control Workbench (v.4.3), running on a Microsoft Surface Pro 2 Windows 8, connected by USB (COM3 at 9600 baud), but I keep getting the error message:

�Connection Failed! No response, check the communication cable, the power on the board or the baudrate (set to 9600 bps).'

Using Keil uVision v.5 MDK-Lite (debug option set to ST-Link Debugger with SW Port in Target COM) I have compiled (by batch build) and downloaded the executable to the board (shown by led LD2 blinking green/red). I actually did manage to get Workbench to connect once, by first running STM32 ST-LINK Utility v.4, connecting that to the board (which showed the address contents) and then exiting ST-LINK. Then Workbench did connect. The motor even started turning, sensorless operation, though there was an immediate Fault over Speed feedback. But repeating the same procedure after recompiling with different start-up parameters, I cannot now get Workbench to connect (for all sorts of combinations of Keil and ST-LINK connected and disconnected, on or off, unplugging and replugging USB and 32 V to board, starting and stopping Workbench and the laptop, a different USB cable). In Device Manager, it looks like the COM3 Port has a working device driver, for 'STMicroelectronics STLink Virtual COM Port (COM3)'.

To sum up, even though ST-LINK and Keil are talking to the board through the USB cable, all I can get when hitting the Connect icon (the plug) within Workbench is the red message 'Connection Failed!....'.

Any suggestions gratefully received! I've asked Technical Support too, and will post any suggestions they make.

Cheers, Peter

#st-workbench-�connection-failed�-to-steval-spin3201
This topic has been closed for replies.

3 replies

Enrico Poli
ST Employee
October 27, 2017
Posted on October 27, 2017 at 14:31

This kind of problem is usually dueto a mismatch between the UART speed you set in the FOC library and the one you are setting on the workbench.

Please, check if the communication is ok using the atteched bin (UART speed 115200bps).

No need to connect the motor, only communication test.

________________

Attachments :

EWARM_STEVAL_SPIN3201_BullRunning_MCWorkbench.bin.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyHx&d=%2Fa%2F0X0000000b6O%2F2_zCQUKgxwwa1h77WL9BRGPdxAH32e6z1tUFa5P9E6Q&asPdf=false
peter watt
Associate
November 1, 2017
Posted on November 01, 2017 at 14:05

Dear Enrico,

Thank you very much for that suggestion! Yes – it did connect! Using STM32 ST-Link Utility, I flashed the binary you sent, then in ST Motor Control Workbench Monitor, still open on the project I have been using for my motor, but with the Port setting 115200, it connected - bringing up the green 'Firmware STM32 FOC SDK Ver. 4.3.0' (which I saw in one session before, but ever since have only seen 'Device not connected' in red). I didn't have that Bullrunning motor so had no motor connected. Encouraged, I went into Control Stage Parameters, changed the Baudrate to 115200, hit Generation, built all in Keil, flashed the new code for my motor to the board, and tried to connect again at 115200 from Workbench Monitor. Alas, the same old “Communication Failed!� error.

I’m wondering if it could be because Keil does not have the STEVAL-SPIN3201 board amongst its Boards directory in Pack Installer. I have only installed the pack for the STM32F031C6 device, which

http://www.st.com/en/motor-drivers/stspin32f0.html

tells me is in

STSPIN32F0

. Might I have to select some other ST board similar to STEVAL-SPIN3201? But I may well be doing something wrong somewhere.

If you can suggest any next step from the above, I’d be very grateful again!

Cheers, Peter.

Enrico Poli
ST Employee
November 7, 2017
Posted on November 07, 2017 at 08:42

Hi Peter,

I'm running out of ideas.

In my opinion the best solution is to clean-up the project and restart using the 

http://www.st.com/content/st_com/en/products/embedded-software/motor-control-ic-software/stsw-spin3201.html

 software example.

It is a pre-configured setup of the MC SDK 4.3 fitting the STEVAL-SPIN3201. It is the same project I used to generate the binary I sent you.

Into the package you also find the folder 'Web\Utilities\WB_Projects\SDK43x' containing a MC Workbench project.

Open it and insert the parameters for your application for generating the new '.h' configuration files.

IMPORTANT! Before compiling, in the main.c, comment the ' ♯ define EXAMPLE_POTENTIOMETER' line.

It is not recommended to have the potentiometer feature and the uart communication enabled at the same time.

Ciao

Enrico

Alexander Reiss
Visitor II
April 14, 2018
Posted on April 14, 2018 at 10:47

Hello,

I have the same problem with System Workbench for STM32 IDE.

If I use the precompiled bullrunning binary (EWARM_STEVAL_SPIN3201_BullRunning_MCWorkbench.bin) as decribed in UM2152 the connection between the STEVAL-SPIN3201 within the Monitor of ST Motor Control Workbench (v.4.3) works fine.

Then I use the example FOC project STSPIN32F0 (User Project and MC Library) and build all with ST IDE.

If I flash the new SW, via the IDE or using the *.bin file just generated, I can not get any connection to STEVAL-SPIN3201 with the ST Motor Control Workbench (v.4.3) .

I've checked the baude rate 'USART_SPEED'  in the header file and it is the same than the one set in the workbench.

I Also set up the project completly again as mensioned before.

What can be the problem remaining?

Best regards,

Alex

Laurent Ca...
Senior III
June 28, 2021

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

Best regards