cancel
Showing results for 
Search instead for 
Did you mean: 

About board EVSPIN32G4

Shlomi9137
Associate II

Hello, I need help the product I mentioned EVSPIN32G4 I've been trying for a long time to find the pins on the board to control GPIO signals instead of SPI Interface

I need to find these pins on the board:

I/O control terminal

GND Ground wire
F/R Forward and reverse
EN Start Stop
BK Brake Control
SV Analog input
PG Speed pulse signal output
ALARM Alarm output
+5V Speed regulation voltage output

 

STSPIN32G4, this is the chip of the board found in EVSPIN32G4

This is the link for the EVSPIN32G4: https://www.st.com/en/evaluation-tools/evspin32g4.html
And that of the STSPIN32G4: https://www.st.com/en/motor-drivers/stspin32g4.html

 

I use external microcontroller with firmware to control the motor driver its for cnc axes movement application

Regarding the I/O control terminal I mentioned, I don't see that there are exactly the same as in the list I mentioned above, just maybe someone can help me find these pins according to the Block Diagram of the STSPIN32G4

 

Thanks for help!

7 REPLIES 7
cedric H
ST Employee

Hello @Shlomi9137 ,

Are you looking for pins on the board that do not exist ?

All the materials can be downloaded here : EVSPIN32G4 - STSPIN32G4 demonstration board for three-phase brushless motors - STMicroelectronics .

Now if you want to see how the MCDSK configures which pins; then once your project is generated, you can open the generated IOC file with cubeMX. It will provide you a graphical view of the STM32G4 embedded in the STSPIN32G4 with all the pins we used properly configured. 

Regards

Cédric

Shlomi9137
Associate II

I tried everything I checked all the data sheet can you help me with this please I just purchased a lot of your boards

GND Ground wire
F/R Forward and reverse
EN Start Stop
BK Brake Control
SV Analog input
PG Speed pulse signal output
ALARM Alarm output
+5V Speed regulation voltage output

 

I download MCDSK & cubeMX


In the software it is not set up the way I need it. Can you check the block diagram of STSPIN32G4 for me and tell me which pins I can match to use the pins I wrote down for you?

Shlomi9137
Associate II


I have added here a picture of the EVSPIN32G4 chip. This is the block diagram. Can you tell me how I can match the list of pins I sent you to the block diagram?Untitled1243.png

cedric H
ST Employee

If you are using an EVSPIN32G4 board, then the configuration of the MCSDK follows the schematic of the board and allow you to select all the alternative configurations possible from your hardware. You mentioned that "In the software it is not set up the way I need it."

Does it mean that the generated software does not work as expected?

What is your actual need?

You are talking about pins that are not part of our eco-system, so it is very tough for us to answer correctly.

GND Ground wire : Are you looking for the ground of the EVSPIN32G4 board ? 

What is F/R Forward and reverse? We do FOC control, the direction of the motor is defined by the PWM duty cycle applied on the 3 phases, there is no pin used for selecting the direction. 

What is SV Analog input ? Do you want to use single shunt or three-shunt config?  By Analog input do you mean ADC input or OPAMP or comparator input?

EN Start Stop : It looks like the Pin PC13 if you look at the table below

BK Brake Control : This board uses internal comparator to do over current protection, internally connected to break input.

PG Speed pulse signal output ? I do not know what this signal is.

Here is the list of all signals we use on the STSPIN32G4 when mounted on a EVSPIN32G4 board.

 
  SYS JTMS-SWDIO PA13 SYS_JTMS-SWDIO
  SYS JTCK-SWCLK PA14 SYS_JTCK-SWCLK
  GPIO Input PC13 BUTTON_TRIGGER
  USART1 TX PA9 UART_TX
  USART1 RX PA10 UART_RX
  ADC1 IN1 PA0 VBUS
  ADC2 IN5 PC4 TEMPERATURE_NTC
  DRV1 CH1 GHS1 GD_CHU_H
  DRV1 CH2 GHS2 GD_CHV_H
  DRV1 CH3 GHS3 GD_CHW_H
  DRV1 CH1N GLS1 GD_CHU_L
  DRV1 CH2N GLS2 GD_CHV_L
  DRV1 CH3N GLS3 GD_CHW_L
  OPAMP1 VINP PA1 CURRENT_SHUNT_UP
  OPAMP1 VINM PA3 CURRENT_AMPLN_U
  OPAMP1 VOUT PA2 CURRENT_AMPL_U
  OPAMP2 VINP PB0 CURRENT_SHUNT_WP
  OPAMP2 VINM PC5 CURRENT_AMPLN_W
  OPAMP2 VOUT PA6 CURRENT_AMPL_W
  OPAMP1 VINP PA7 CURRENT_SHUNT_VP
  ADC1 IN3 PA2 OPAMP1_OUT
  ADC2 IN3 PA6 OPAMP2_OUT
  COMP1 INP PA1 CURRENT_SHUNT_UP
  COMP2 INP PA7 CURRENT_SHUNT_VP
  COMP4 INP PB0 CURRENT_SHUNT_WP

Regards

Cedric

Shlomi9137
Associate II

Can u tell me please how i can control of motor speed in board?

cedric H
ST Employee

We offer a Motor Control Software Development Kit.
It means a library with full sources you can use to build your own application on top of it.

The library comes with a complete set of API that you can call from your application to control your motor.
On top of that, we developed a UART communication protocol to ease our users to debug their motor setup with a PC Tool : The MC Pilot.

For the need of a specific ESC-G4 board we developed on top of the library an ESC state machine to control the board from a PWM input signal.

Now, I do not know what your needs are.
You can use the UART if you implement the master flavor of the motor control protocol in your host controller. (or develop a lighter version if you do not need a connected protocol)
Or you can backport our ESC state machine if you have a PWM control input. To do so, you can generate an ESC-G4 project with PWM input control and backport the esc.c file. Be aware that our esc implementation targets drone application, so it controls the speed only in positive direction. This is an application choice; the library allows to control the motor in both directions.

But you can also imagine sending an analog signal with a DAC on one side and an ADC on the other side.

Hope it helps.
Cedric

Shlomi9137
Associate II

First of all, thanks for the detailed explanation!

Now I probably understand better about EVSPIN32G4

If I understood correctly, EVSPIN32G4 is better built to use Interfaces: I2C, SPI, UART and CAN

Because there are already all the commands ready for use in the library and I only have to choose the commands I need to use and adapt them to the use I need

I will tell you why I got confused because usually there are 3 phase brushless motor drivers that are already configured for use through pins that are already programmed, that is to say for example there are 2 pins pin number 1 controls the speed and pin number 2 controls the direction

In the EVSPIN32G4, all the commands to use the motor are already programmed inside and I only have to use Interfaces to control the commands, on the other hand, there are motor drives whose pins each pin is defined for a specific purpose, while in the EVSPIN32G4 the use is greater and more extensive. If I made a mistake or something, I would appreciate it if you could correct me and explain to me again...

Thank you!