Weird PWM behaviour on ESP8266

Hello,

I am observing weirg behaviour of mgos_pwm_set on ESP8266.

  1. If duty is 0.0 then there are still active pulses on the output (and the LED is slightly shining)
  2. Lowest value of the duty is limited by frequency. For example mgos_pwm_set(5, 1000, 0.01) makes the LED much brighter than mgos_pwm_set(5, 50, 0.01). I would expect both calls to make the LED the same brightness. mgos_pwm_set(5, 10000, 0.01); makes it even worse.

Is there a way to fix those 2 problems?

Thanks in advance!