Hi all,
according to the techincal specs, the LED PWM has 4 high speed timers, 8 high speed channels, and 4 low speed timers 8 low speed channels. My questions is how to access all 8 timers, as the PWM example from the ESP-IDF only provides 4 timers configurable.
Below is part of the ledc.h from the IDF
typedef enum {
LEDC_TIMER_0 = 0, /*!< LEDC timer 0 */
LEDC_TIMER_1, /*!< LEDC timer 1 */
LEDC_TIMER_2, /*!< LEDC timer 2 */
LEDC_TIMER_3, /*!< LEDC timer 3 */
LEDC_TIMER_MAX,
} ledc_timer_t;
typedef enum {
LEDC_CHANNEL_0 = 0, /*!< LEDC channel 0 */
LEDC_CHANNEL_1, /*!< LEDC channel 1 */
LEDC_CHANNEL_2, /*!< LEDC channel 2 */
LEDC_CHANNEL_3, /*!< LEDC channel 3 */
LEDC_CHANNEL_4, /*!< LEDC channel 4 */
LEDC_CHANNEL_5, /*!< LEDC channel 5 */
LEDC_CHANNEL_6, /*!< LEDC channel 6 */
LEDC_CHANNEL_7, /*!< LEDC channel 7 */
LEDC_CHANNEL_MAX,
} ledc_channel_t;
as can be seen, there are only 4 timers available for config. Help would be appreciated to configure all 8 timers for configuring 8 different external devices (LEDs or different pwm controllable devices) thx.
LED PWM timer control query
-
- Posts: 9723
- Joined: Thu Nov 26, 2015 4:08 am
Re: LED PWM timer control query
You can select if you want the low- or high-speed timers by setting the speed_mode member of ledc_timer_config_t appropriately; that allows you to configure all 8 timers.
Re: LED PWM timer control query
thx , that worked.
Who is online
Users browsing this forum: No registered users and 379 guests