SimpleFOCMini problem with Stm32f411re

Hey Folks,
Complete newbie here with what seems like a very simple issue.
I am trying to control a GM3506 BLDC motor using an Nucleo Stm32F411RE and a SimpleFOC mini.
I have the driver in on pins 13,12,11,10, and powered with an external 12v power supply.
The Nucleo is powered via usb.
I’m trying to run the open loop position example through the Aurdino IDE.
It seems to flash without any issue however, I am not getting anything in the serial monitor, and never prints the motor ready prompt.
If send a value it does return in the serial monitor, but the motor does not move.

// Open loop motor control example
#include <SimpleFOC.h>

// BLDC motor & driver instance
// BLDCMotor motor = BLDCMotor(pole pair number);
BLDCMotor motor = BLDCMotor(11);
// BLDCDriver3PWM driver = BLDCDriver3PWM(pwmA, pwmB, pwmC, Enable(optional));
BLDCDriver3PWM driver = BLDCDriver3PWM(13, 12, 11, 10);

// Stepper motor & driver instance
//StepperMotor motor = StepperMotor(50);
//StepperDriver4PWM driver = StepperDriver4PWM(9, 5, 10, 6,  8);

//target variable
float target_velocity = 0;

// instantiate the commander
Commander command = Commander(Serial);
void doTarget(char* cmd) { command.scalar(&target_velocity, cmd); }
void doLimit(char* cmd) { command.scalar(&motor.voltage_limit, cmd); }

void setup() {

  // driver config
  // power supply voltage [V]
  driver.voltage_power_supply = 12;
  // limit the maximal dc voltage the driver can set
  // as a protection measure for the low-resistance motors
  // this value is fixed on startup
  driver.voltage_limit = 6;
  // link the motor and the driver

  // limiting motor movements
  // limit the voltage to be set to the motor
  // start very low for high resistance motors
  // currnet = resistance*voltage, so try to be well under 1Amp
  motor.voltage_limit = 3;   // [V]
  // open loop control config
  motor.controller = MotionControlType::velocity_openloop;

  // init motor hardware

  // add target command T
  command.add('T', doTarget, "target velocity");
  command.add('L', doLimit, "voltage limit");

  Serial.println("Motor ready!");
  Serial.println("Set target velocity [rad/s]");

void loop() {

  // open loop velocity movement
  // using motor.voltage_limit and motor.velocity_limit

  // user communication;

I feel like there is something simple I am missing here and apologize in advance lol

Hey @Yetti , welcome to SimpleFOC!

If its the USB serial you’re using on the Nucleo, I think it is usually “Serial2”.

You could try Serial2.begin(115200); Serial2.println("Motor ready!");, etc… and see if this helps. You’d also have to use Commander(Serial2) if that’s the issue.

I assume you’ve got the Arduino’s Serial monitor configured to the same speed?

Oh, and also you might want insert a delay(2000) or similar after the Serial2.begin() - if the Nucleo starts quickly, the Arduino IDE might not start the Serial console in time for you to see the messages…

Hey @Yetti,

The issue is Nucleo f411re’s pinout. It actually has inverted timer channel connected to the pin 11, which we do not support at the moment. Which means that you will not be able to run the simplefoc mini board stacked from the pin 13 to pin 10 with the f411re nucleo.