LED_PWM documentation: LEDC_HSCHn_DUTY_REG understatement
Posted: Mon Sep 23, 2019 1:23 pm
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?
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?