Page 1 of 1

LED_PWM documentation: LEDC_HSCHn_DUTY_REG understatement

Posted: Mon Sep 23, 2019 1:23 pm
by KanyeKanye
I am trying to write my own implementation of PWM driver for generating frequencies below 1Hz.

Reading LED_PWM documentation I see some understatement: under LEDC_LSCHn_DUTY_REG (page 387) there is written:
LEDC_DUTY_LSCHn The register is used to control output duty. When lstimerx(x=[0,3]), chosen by
low-speed channel n, has reached LEDC_LPOINT_LSCHn,the output signal changes to low. (R/W)
LEDC_LPOINT_LSCHn=(LEDC_HPOINT_LSCHn[19:0]+LEDC_DUTY_LSCHn[24:4]) (1)
LEDC_LPOINT_LSCHn=(LEDC_HPOINT_LSCHn[19:0]+LEDC_DUTY_LSCHn[24:4] +1) (2)

See the Functional Description for more information on when (1) or (2) is chosen.

How can I set mode described as 2?

Re: LED_PWM documentation: LEDC_HSCHn_DUTY_REG understatement

Posted: Mon Sep 23, 2019 8:24 pm
by WiFive
You can't, that is for dithering with fractional divider.