STM32 Hardware Timer Question

why this doesnt work (blinking led)

void setup() {
HardwareTimer *MyTim = new HardwareTimer(TIM3);
MyTim->setPWM(1,PC6, 1, 50); // 1 Hertz, 50% dutycycle
void loop() {}

Hey @Lukas_Pfitscher,

That’s not really a SimpleFOC specific question :wink:

But we’re happy to help if we can!

Looking at our own timer code for STM32, I see that we initialize a lot more stuff, including setting the counter mode and repetition counter, and then calling
on the timer’s handle…

So first question I wonder is if it is really sufficiently initialised in your code.

I assume you’ve checked that PC6 is connected to TIM3?