Closed
Description
Refering to https://github.com/arduino/ArduinoCore-renesas/blob/main/cores/arduino/pwm.h
the begin() function takes period and pulse length as arguments, but as unsigned integers. That means the minimal resolution is 1us. For higher frequencies, this is too rough.
Example: I want to drive a piezo at 230 KHz. My options are t=4us which is 250KHz, or t=5us which is 200KHz. Both are not close enough.
It would be helpful to have a function that takes the frequency and duty cycle as arguments. Currently the begin() function even does the conversion before it calls the api function from bsp, so it is technically not an issue.