simplefoc / Arduino-FOC

Arduino FOC for BLDC and Stepper motors - Arduino Based Field Oriented Control Algorithm Library
https://docs.simplefoc.com
MIT License
1.95k stars 511 forks source link

RP2040 PWM driver now supports pre-scaler #277

Closed runger1101001 closed 1 year ago

runger1101001 commented 1 year ago

The PWM driver for RP2040 now uses the pre-scaler (which includes a fractional setting) to accurately set any desired PWM frequency between 1Hz and 66kHz. Why so low as 1Hz? To support use cases like controlling a RC-servo (possible via the SimpleDC Library DCDriver1PWM class).