Steval-spin3202

By change I got a STEVAL-SPIN3202 motor controller board on the Embedded World 2024 in Nürnberg. I didn’t find an Arduino support for this, but because the controller is base on a STM32F031 MCU I just tried to setup a PlatformIO project and selected a Nucleo F031k6.
I’m very happy that I could get the LEDs on this board blinking.
The script might be useful for others to have a quick startup:

#include <Arduino.h>

/*

STEVAL-SPIN3202 LED blink example

Getting started with the STEVAL-SPIN3202 evaluation board, advanced BLDC
controller with embedded STM32 MCU

https://www.st.com/en/evaluation-tools/steval-spin3202.html
https://www.mouser.de/ProductDetail/STMicroelectronics/STEVAL-SPIN3202

The STSPIN32F0A motor controller has a build in STM32F031 MCU.

It is possible to use Platform IO, selecting the Nucleo F031K6 board to flash this test program.

Use Platform IO and select board The
nucleo_f031k6

13.4.2024 ChrisMicro

*/

#define USER1 7 // LED and button connected to PF0
#define USER2 8 // LED and button connected to PF1

void setup()
{
pinMode(USER1, OUTPUT);
pinMode(USER2, OUTPUT);
}

#define DELAYTIME_MS 100
void loop()
{
digitalWrite(USER1, HIGH);
delay(DELAYTIME_MS);
digitalWrite(USER1, LOW);
delay(DELAYTIME_MS);

digitalWrite(USER2, HIGH);
delay(DELAYTIME_MS);
digitalWrite(USER2, LOW);
delay(DELAYTIME_MS);
}

You should at the ST-Link in the Platform.ini

; PlatformIO Project Configuration File

;

; Build options: build flags, source filter

; Upload options: custom upload port, speed and extra flags

; Library options: dependencies, extra library storages

; Advanced options: extra scripting

;

[env:nucleo_f031k6]

platform = ststm32

board = nucleo_f031k6

framework = arduino

; added by me CH

debug_tool = stlink

1 Like