I use PlatformIO and fiddle with the STM32F1 Blue Pill
so far so good, but I have a Problem with the Timer Hardware Interrupts
Thats my code
It compile without any Problems but the timers do not count
Code: Select all
void handler3(void) {
count3++;
// Serial.print("T3");
}
void handler4(void) {
count4++;
// Serial.print("T4");
}
Timer3.setMode(TIMER_CH2, TIMER_OUTPUT_COMPARE);
Timer4.setMode(TIMER_CH4, TIMER_OUTPUT_COMPARE);
Timer3.pause();
Timer4.pause();
Timer3.setCount(0);
Timer4.setCount(0);
Timer3.setOverflow(30000);
Timer4.setOverflow(30000);
Timer3.setCompare(TIMER_CH3, 1000);
Timer4.setCompare(TIMER_CH4, 1000);
Timer3.attachInterrupt(TIMER_CH3, handler3);
Timer4.attachInterrupt(TIMER_CH4, handler4);
Timer3.refresh();
Timer4.refresh();
Timer3.resume();
Timer4.resume();