6 PWM STM32F103C8 need help

/ BLDC driver standalone example
#include <SimpleFOC.h>

// BLDC driver instance
//BLDCDriver6PWM driver = BLDCDriver6PWM(5, 6, 9,10, 3, 11, 8);
BLDCDriver6PWM driver = BLDCDriver6PWM(PB8, PB9, PA6, PA8, PB6, PB7, PA7);

void setup() {

// pwm frequency to be used [Hz]
// for atmega328 fixed to 32kHz
// esp32/stm32/teensy configurable
driver.pwm_frequency = 50000;
// power supply voltage [V]
driver.voltage_power_supply = 12;
// Max DC voltage allowed - default voltage_power_supply
driver.voltage_limit = 12;
// daad_zone [0,1] - default 0.02f - 2%
driver.dead_zone = 0.05f;

// driver init
driver.init();

// enable driver
driver.enable();

_delay(1000);
}

void loop() {
// setting pwm
// phase A: 3V
// phase B: 6V
// phase C: 5V
driver.setPwm(3,6,5);
}


I use this code back to the board I created. I’ve tried to check the pwm signal but it’s not working in the command. I need advice and help from friends.

Hey @Ecuflasher_Thailand ,

I think we had a long discussion on Discord :slight_smile:

I like your board, I hope it works for you now that we solved the connection problems…

1 Like

This is you
really thank you
I’m starting to do it Will update in a moment.

The motor does not rotate smoothly.
I want help from a friend