-
Notifications
You must be signed in to change notification settings - Fork 647
ESP32C3 fix ledc_channel_config(847): sleep_mode argument invalid #489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks for reporting/solving this. Espressif guys are making our life difficult recently. They are introducing braking changes to their low level api very often, almost every few months. Which version of the arduino-esp32 package are you using? |
|
@uLipe do you maybe have some thoughts on this? We've had a couple of these changes recently that are braking our compilation. |
|
Hello @askuric @bisak , I agree with the solution proposed, it is the best way for fixing it. Why this causes an error:
So telling this driver will be ALIVE during its initialization flow will resulting on taking this driver PM_LOCK and never releasing it which signals the IDF system telling: don't put this peripheral in sleep mode, so this solution is perfect to avoid bad-operation of the LEDC in runtime. BTW C3 is far more aggressive on its low power framework, that is probably behind the error happens right after you initialize it. |
uLipe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the IDF perspective, LGTM.
|
Regarding the future proof, this started to become a concern on the latest versions of IDF 5, but before that, the rule of thumb is, if a particular component is developed under the same major number of IDF it should not break, but when it targets a new IDF (from 4 to 5) it will break. For the next releases the IDF is being more smooth between these versions, by making an API deprecated before removing it. What I suggest is still the ugly solution, read the IDF version of the particular arduino core, and add remove code based on it, cc: @askuric |
|
Huge thank you for merging this! |
Hi, quick PR here.
This was the only way I was able to make this board work -> https://www.espboards.dev/esp32/esp32-c3-super-mini-plus/
No matter which pins I used, I was intermittently 3 out of 5 boots getting the following error:
This PR fixes it. I don't know if this is a good solution, but works bulletproof for the C3 board in quesiton.
Open to discuss. Thanks.