cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure the board for experimenting in MotorPilot with STEVAL-SPIN3204? The PC recognises the evaluation board and I followed the steps in the MotorPilot manual. But I always get warning - Port Open and try to configure the board.

KSpeh.1
Associate II

0693W00000Lw7S2QAJ.png

6 REPLIES 6
cedric H
ST Employee

Hello @KSpeh.1​ ,

What is your MCSDK version ?

Unfortunately we introduced a regression in the 5.Y.4 release concerning STM32F0 series using USART1 and USART3. (STSPIN32F0B is build on top of STM32F0)

Release 5.Y.3 is not affected and I suggest you to move to this version.

Regards

Cedric

dbuso.11
Associate II

Hello

I tried with the 5.Y.3 but with cubeMx version 6.4 code generation never start to generate code (stucked before anything is done). I downgrade to cubeMx version 6.3 and in this case code generation is OK. But once I opened the generated files under Keil IDE I get multiple compilation error due to header files not found (the first one in the list is stm32f0xx_hal.h). I tried to find stm32f0xx_hal.h manually in the project folder but the file is not existing therefore it's not an issue of wrong include path. Instead I found a file called stm32f0xx_ha_conf.h.... Seems that there is a mismatch somewhere between software version.

Is someone can be of any help please?

Ps: everything seems to work fine with MCSDK 5.Y.4 and CubeMx 6.4 from code generation to upload on the target except that I cannot use the motor monitor due to UART incompatibility with MCSDK 5.Y.4.

Thanks in advance

David

cedric H
ST Employee

Hello @dbuso.1​ 

The easiest way to solve your issue is to patch the release 5.Y.4 on your environment.

There is one line to change in your MCSDK cubeMX repository.

CubeMX uses MCSDK from his own repository which is located in $HOME\STM32Cube\Repository by default.

For the release 5.Y.4, you should have a directory:

$HOME\STM32Cube\Repository\MCSDK_v5.Y.4-Full\MotorControl\templates

Inside this directory, please replace the line 471 of the file stm32f0xx_mc_it.c.ftl

<#if MC.MCP_OVER_UART_A && (MC.USART_SELECTION == "USE_USART2" || MC.USART_SELECTION == "USE_USART4")>

By the following line :

<#if MC.MCP_OVER_UART_A >

Once it is done, you must re-generate your project from Motor control workbench.

This additional code will be added in the generated stm32f0xx_mc_it.c file inside the SysTick_Handler function:

 /* Buffer is ready by the HW layer to be processed */ 
 if (LL_DMA_IsActiveFlag_TC (DMA_RX_A, DMACH_RX_A))
 {
  LL_DMA_ClearFlag_TC (DMA_RX_A, DMACH_RX_A);
  ASPEP_HWDataReceivedIT(&aspepOverUartA);
 }
 else
 {
  /* Nothing to do */
 }

Sorry again for the inconvenience.

Let me know if you need additional information.

Best Regards

Cedric

dbuso.11
Associate II

Hello Cedric,

Thank you very much, the patch works.

Nevertheless new problems arise: As soon as I want to send an instruction through ST motor PILOT, I get the message Port Open but no answer from board. I have to uncheck Polling in order toi have a stable connection otherwise the above error message is displayed and connection lost. Here is a screenshot of what happen when I send START command for example.

Best Regards

David0693W00000WIp8KQAT.jpg

cedric H
ST Employee

Hello David,

I think your issue comes from your baudrate. 115200 is too slow.

With the new protocol we set it by default to 1843200.

You can change it through cubeMx or directly from your main.c, and of course on the Pilot too.

Let me know if it works.

Cedric

dbuso.11
Associate II

Hello Cedric,

Exactly the same issue with a baud rate set to 1843200 in main.c and in motor control.

Just after connection established, I get in the terminal the message "ASPEP_BEACON Mismatch on crc_cpacility RXS_MAX TXS_Max TXA_Max" and connection is still alive.

As soon as I click on START button (for example, but it's the same results with all other button) I get the the error message ERROR: ASPEP TRAN?SACTION TIMEOUT 2000 ms and connection is lost.

Another idea?

Regards

David

PS: I cannot select this speed on the port parameter tab in the win driver section (max speed selectable is 128000). My driver is up to date.