Using ESP-IDF framework and trying to set it before or after configure the cledc hannel with "ledc_channel_config()" does not work.
for example after configuration of ledc channel
Code: Select all
#include <driver/ledc.h>
#include <driver/gpio.h>
...
ledc_channel.pin = pin;
ledc_channel_config(&ledc_channel);
gpio_set_direction(pin, GPIO_MODE_OUTPUT_OD);
...
Code: Select all
#include "Arduino.h"
...
ledc_channel.pin = pin;
ledc_channel_config(&ledc_channel);
pinMode(pwm[j].pin,OUTPUT_OPEN_DRAIN);
mfG
winfried