Closed API-rep closed 1 year ago
Since you are using IDF API, I suggest you to file an issue in IDF's github repo. You can state that you are running ESP-IDF v4.4.4 with Arduino
EDIT : Issue found. A (stupid) typo error. I forgot the flags. before the output_invert parrameter. All compile fine nox. You can safely close or delete the topic.
Board
ESP32 Dev module (Wroom-32)
Device Description
Wired on readboard
Hardware Configuration
RC servo / motor driver.
Version
v2.0.9
IDE Name
Arduino IDE
Operating System
Windows 10
Flash frequency
80Mhz
PSRAM enabled
yes
Upload speed
921600
Description
I'm working on a small library to drive DC and servo motor via ledc PWM output. To go deeper in timer management, I write it with ESP32 IDF regular syntax and structure. I've noticed that randomly, PWM output is inverted, regardless of the port use. I supposed a hardware trouble, but this problem happened with other ESP32 dev kit module.
Trouble was fixed by adding a _GPIO.func_out_sel_cfg[SERVO_PIN].inv_sel = 0_ on my code.
During my research to fix this problem, I noticed that the Espressif ESP32 IDF have a _outputinvert flag on its ledc_channel_config_t_ struct. I tried to implement it on my code, but Arduino ESP32 port seemed to miss this one and return me an error during compilation. I'm not a c expert programmer, but I suspect a non initialization of this variable by Arduino port who can cause this random problem ? Could you check that deeper in your code please.
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide