LED_PWM documentation: LEDC_HSCHn_DUTY_REG understatement

KanyeKanye
Posts: 54
Joined: Mon Dec 05, 2016 12:34 am

LED_PWM documentation: LEDC_HSCHn_DUTY_REG understatement

Postby KanyeKanye » 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?

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: LED_PWM documentation: LEDC_HSCHn_DUTY_REG understatement

Postby WiFive » Mon Sep 23, 2019 8:24 pm

You can't, that is for dithering with fractional divider.

Who is online

Users browsing this forum: Baidu [Spider], Majestic-12 [Bot] and 112 guests