cancel
Showing results for 
Search instead for 
Did you mean: 

USB/com interface not working in STEVAL-SPIN3204/Windows10

ranrang
Associate II

Hi, I am new to ST evaluation board. I am trying to connect STEVAL-SPIN3204 board to a windows 10, and it is not working.

In more details: The board is working with stsw-link007 (ST-LinkUpgrade) and loads the recent driver version (V2J43M28). The USB connects to Windows as Drive D with details.txt file.

I loaded en.stsw-link009 drivers (64 bits) and updated the com port (STMicroelectronics STLink Virtual COM Port (COM3)) driver to version 2.2.0.0 dated 4/1/2021. The COM port hardware Ids are USB\VID_0483PID_374B&REV_000&MI_02 and USB\VID_0483PID_374B&MI_02.

The COM port is configured for 115200 baud, 8 bits, not parity, 1 stop bit.

However, when it is connected to the ST Motor Pilot V.1.2.5 that came with Motor Pilot 6.2.1 - it is not working and the board remains disconnected. Discover Board fails with the following message:

[INFO] - : Application is starting : MotorPilot version:1.2.5

[INFO] - : ini file path=C:/Users/Ran/AppData/Roaming/ST Microelectronics/ST Motor Pilot.ini

[INFO] - : Polling time out is set to 200 ms

[INFO] - : set qml to : qrc:/GUI/defaultApp.qml

[INFO] - : Loading registers bank desciption file C:/Program Files (x86)/STMicroelectronics/MC_SDK_6.2.1/Utilities/PC_Software/STMotorPilot/RegisterList/RegListMinimal.json

[INFO] - : Registers bank description loaded successfully

[INFO] - : Load Application qrc:/GUI/defaultApp.qml

[INFO] - : QML Application ready

[INFO] - : sdkPath=C:/Program Files (x86)/STMicroelectronics/MC_SDK_6.2.1

[INFO] - : disconnect UART START

[INFO] - : Disconnected from board

[INFO] - : disconnect UART END

[INFO] - : try to connect to COM3@1843200 Bauds

[INFO] - UART worker: Successfully open port COM3 @ 1843200

[INFO] - : try to configure the board

[INFO] - : Disconnected from board

[INFO] - : try to connect to COM3@115200 baud

[INFO] - UART worker: Successfully open port COM3 @ 115200

[INFO] - : try to configure the board

[INFO] - : Disconnected from board

[ERROR] - : Failed to discover Board at 1843200 Bauds and 115200 Bauds

[INFO] - : disconnect UART START

[INFO] - : Disconnected from board

[INFO] - : disconnect UART END

 

and terminal shows Tx msg of 85FFFFF (ASPEP_BEACON) and no Rx msg (ERROR:ASPEP BEACON TIMEOUT 500ms).

I replaced the cable, and used another (similar) evaluation board - and the issue remains.

What am I missing here?

 

Thanks for any idea that will solve this issue.

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
cedric H
ST Employee

Your settings are perfectly fine and aligned with your STSPIN32F0. But yeah, if you do not flash your code... no chance to connect !

I strongly advise you to read the Getting started chapter from the Documentation page accessible from the about menu of the MC Workbench.

cedricH_0-1702914445714.png

 

Regards

Cedric

View solution in original post

12 REPLIES 12
liaifat85
Senior II

Confirm that the COM port settings match the requirements of the board (115200 baud rate, 8 data bits, no parity, 1 stop bit). Also, ensure that the correct COM port is selected in the ST Motor Pilot software.

Thanks, I checked it. the same baud rate, 8 data bits, no parity, 1 stop bit. What else can go wrong?

cedric H
ST Employee

Hello @ranran,

Before going further, could you confirm that you generated a Motor control project with MCSDK 6.2.1 ?

The connection with ST Motor Pilot requires a software protocol which comes with a Motor control project only if it is enabled. To do so, go in the User Interface section, and check that the Motor Control Protocol over USART A is enabled as shown below: (look also at the Baudrate, it is the one you have to apply at MC Pilot side)

cedricH_0-1702912190453.png

Once your project is generated, compiled and flashed to your MCU, you can connect the Pilot only if the MCU is not paused. So be careful if you attached a debugger that it did not break the processor.

Let us know if it helps.

Regards

Cedric

Thanks, It is 6.2.1. I generated and compiled a sample application, but have not flashed it yet (I wanted to check motor parameters). I shall flash it to the MCU... this part was not done yet. I shall let you know the results. BTW, the Interface sectoin of the SPIN3204 board is a bit different. Here is how I set it up.

cedric H
ST Employee

Your settings are perfectly fine and aligned with your STSPIN32F0. But yeah, if you do not flash your code... no chance to connect !

I strongly advise you to read the Getting started chapter from the Documentation page accessible from the about menu of the MC Workbench.

cedricH_0-1702914445714.png

 

Regards

Cedric

Thanks again. I read it, and many other application notes, UMs, specs, theory, howtos, getting started, and a week of doing so. And I have lots of experience in embedded stuff. Even wrote a book. It seems that you have lots of docs, some outdated, many repetitions, and quite a complicated way of explanations. 

Not arguing, however, there isn't a clue that I should download first the application to the board. On the contrary - after the IDE compile - it goes directly to profiling. Moreover, for the first-time user of the IDE (or after a break of 15 years), not a word about having to run the STLINK server. Just an example. What is required, in my opinion, is a simple cookbook at the end of the description of all SW components. And a problem solver (see next paragraph).

And now, for example, the application runs fine, but the profiler isn't starting, due to a wrong motor config (register 105). Firmware 0.2 message in big red rectangular - with no further explanation (and I suggested the number of pairs). Go a find what it means and how to correct it.

And back to my problem - I have an unknown motor. All I know is that it is BLDC, 12V, 1A. How do I manage to profile it? to define it to the application I want to write?

And again - not complaining, just observing and making notes. I'll solve it eventually, but it will take lots of time to find the answers.

Thanks, Ran

I second that.

The actual experience of the MCSDK desktop tools diverges quite a bit from the marketing brochures / videos ("get ...  running in under 2 minutes!" [on my dev machine]).

Have you gotten everything working by now?

No, lots of frustrations and wasted time. I left it for a while (I do have things to do in life) and just returned to it yesterday. Will survive and manage this SW/HW eventually. The profiler is not working, Firmware 0.2, and I'm using trial and error. For example, did you know that the profiler requires a 3-shunt board configuration? Not a word in the documentation (or I missed it). So I had to buy a board with a 3-shunt. Still have an error. despite the fact it runs the default program created by the workbench...

cedric H
ST Employee

Hello @ranrang ,

I am sorry to read that our MCSDK did not satisfy your expectations.

If I am right your configuration is based on a STSPIN32F0. 

But if you read the introduction chapter of the Profiler Application note you can see the line I just highlighted:

cedricH_0-1705067485579.png

STSPIN32F0 embeds an STM32F0, therefore profiler cannot work with your configuration.

If you read the chapter just after the introduction, you can find the following line:

cedricH_1-1705067783286.png

In a previous post you mentioned "Not arguing, however, there isn't a clue that I should download first the application to the board." 

In the Getting Started with Motor Control SDK, you can find the following instructions.

 

cedricH_2-1705081391378.png

Best Regards

Cedric