PWM out as audio

Hi everybody.
I’m experimenting with my NANO, and i just discovered the pwm pins, and its management through sysfs.
I’d like to use the pwm pin (for example pwmchip0) as a pwm audio signal, and treat my nano as a digital audio synth.
I know it would sound bad, but it’s just for fun :)

The main problem is the frequency rate.
Is it possible to “force” the pwm signal in a range between 20 Hz and 20Khz?

hello thomas.galliano,

you may check /sys/kernel/debug/pwm for those PWM status.
there’s clock source provided to the PWM controller, it will have a range of output rate.
for example,

tegra_pwm: pwm@7000a000 {
                clocks = <&tegra_car TEGRA210_CLK_PWM>,
                         <&tegra_car TEGRA210_CLK_PLL_P>;