-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
Fix the F_CPU frequency definition for the ESP32-S3 in esp32-hal.h #7913
Conversation
Hello, I was using the FastLED library and it was complaining about F_CPU not being defined. So, I just noticed that it is not defined for the ESP32-S3 module. So I made this change in the header file and it compiled. Therefore I wanted to propose this change to the HAL library to improve compatibility. Thank you for your time.
Interesting. LGTM. I wonder if C3 and other variants also need an entry? |
They probably would need to. And every single board that comes after. This is not a good way of doing it tbh, but that's how its defined in the sdkconfig. The interesting thing is that this error does not occur in PlatformIO, probably because it gets defined in somewhere else and this part is skipped. But it does so in esp-idf when arduino used as a component. So this is how I solved it for my own application. It would be better if the other boards are added to this, but I didn't look much about how many other variants there are. |
Works for ESP32, ESP32C3, ESP32S2, ESP32S3
I just modified the PR to be generic, based on the sdkconfig definition of each SoC. @devrim-oguz - please test and confirm that it works for the FastLED library with the S3. |
OK... Actually the fix I did works for the IDF 5.1 and Arduino 3.0.0. |
Necessary for ESP32 Arduino Core 2.0.x based on IDF 4.4
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.
Just added also support to ESP32C3.
Thanks @devrim-oguz and @mrengineer7777 !
Thank you for making it available for everyone |
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.
LGTM
Description of Change
Hello, I was using the FastLED library and it was complaining about F_CPU not being defined. So, I just noticed that it is not defined for the ESP32-S3 module. So I made this change in the header file and it compiled. Therefore I wanted to propose this change to the HAL library to improve compatibility. Thank you for your time.
Tests scenarios
I have tested this with the ESP32-S3-WROOM-1-N16R2 module for the FastLED library. Haven't done any extensive testing since it is a trivial change (I hope).
#Fix #8005