khoih-prog / STM32_TimerInterrupt

This library enables you to use Interrupt from Hardware Timers on an STM32F/L/H/G/WB/MP1-based board. These STM32F/L/H/G/WB/MP1 Hardware Timers, using Interrupt, still work even if other functions are blocking. Moreover, they are much more precise (certainly depending on clock frequency accuracy) than other software timers using millis() or micros(). That's mandatory if you need to measure some data requiring better accuracy. It now supports 16 ISR-based Timers, while consuming only 1 Hardware Timer. Timers' interval is very long (ulong millisecs). The most important feature is they're ISR-based Timers. Therefore, their executions are not blocked by bad-behaving functions or tasks. This important feature is absolutely necessary for mission-critical tasks.
MIT License
32 stars 7 forks source link

Center Aligned PWM output MODE #3

Closed roccotarocco closed 3 years ago

roccotarocco commented 3 years ago

Hi, very nice development, thanks for effort. What about the possibility to activate from Arduino IDE the Center Aligned output mode? Thanks TG

khoih-prog commented 3 years ago

Thanks for your nice words.

Currently, the library is written just to provide TimerInterrupt-related features, and doesn't support PWM for controlling Servos, etc. You certainly can use this library to achieve that Center Aligned output mode, with some more tailor-made codes.

You can

  1. Have a look at STM32 Servo library to use for Servo or
  2. Even use STM32 HardwareTimer directly to program the Center Aligned output mode.

I definitely will add the Center Aligned and PWM support later to this library if there are more similar Center Aligned and PWM requests, or even write STM32_ISR-based Servo library, similar to ESP8266_ISR_Servo and ESP32_ISR_Servo.

Anyway, I have to close the issue now.