Re: [PATCH v3 4/7] pwm: ntxec: Add driver for PWM function in Netronix EC

From: Andy Shevchenko
Date: Sat Oct 03 2020 - 04:18:34 EST


On Sat, Oct 3, 2020 at 2:36 AM Jonathan Neuschäfer
<j.neuschaefer@xxxxxxx> wrote:
> On Mon, Sep 28, 2020 at 10:35:46AM +0200, Uwe Kleine-König wrote:
> > On Sun, Sep 27, 2020 at 11:10:44PM +0200, Jonathan Neuschäfer wrote:

...

> > You can even check this with an LED using something like:
> >
> > pwm_apply(mypwm, {.enabled = true, .duty_cycle = $big, .period = $big});
> > pwm_apply(mypwm, {.enabled = false, ... });
> >
> > . If the period is completed the LED is on for $big ns, if not the LED
> > is on for a timespan that is probably hardly noticable with the human
> > eye.
>
> The longest configurable period is about 8ms, so it's not long enough to
> see anything. However, after writing enable=0, it can take about a
> second for the PWM signal to turn off... this hardware is a bit weird.

Sounds like you have 1/128 divisor and off/on is done on lower
frequency. (We saw PWMs with an additional 7-bit counter, reminds me
Crystal Cove PMIC PWM).

--
With Best Regards,
Andy Shevchenko