Error using ledc_set_freq() function
Posted: Tue Aug 14, 2018 4:10 pm
Hi all,
I was trying to combine two ESP-IDF examples: one is ADC that I use an external potentiometer to adjust the ADC reading, and the other is to update the blinking LED PWM frequency.
Hardware setup:
Pot: 3.3V, GND, and pin GPIO34
GPIO 18 -> LED -> 330 Ohm resistor -> GND
Here is my code: When I turn the pot knob down such that the mapped frequency is less than 10Hz, I get "ledc: div param err, div_param=2500000." When I increase the ADC reading voltage such that the mapped frequency is above 10 Hz, the problem is gone.
What does this error mean? And how do it fix it?
I tried with giving a fixed ledc_timer.freq_hz to the ledc_set_freq() function, but the problem remains the same.
I also tried turning of vTaskDelay(), the problem remains the same.
Thank you for any suggestions and comments
I was trying to combine two ESP-IDF examples: one is ADC that I use an external potentiometer to adjust the ADC reading, and the other is to update the blinking LED PWM frequency.
Hardware setup:
Pot: 3.3V, GND, and pin GPIO34
GPIO 18 -> LED -> 330 Ohm resistor -> GND
Here is my code: When I turn the pot knob down such that the mapped frequency is less than 10Hz, I get "ledc: div param err, div_param=2500000." When I increase the ADC reading voltage such that the mapped frequency is above 10 Hz, the problem is gone.
What does this error mean? And how do it fix it?
I tried with giving a fixed ledc_timer.freq_hz to the ledc_set_freq() function, but the problem remains the same.
I also tried turning of vTaskDelay(), the problem remains the same.
Thank you for any suggestions and comments