Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 85d179c

Browse filesBrowse files
Apply this change to 2.0.9 (espressif#8131)
* Fix the F_CPU frequency for the ESP32-S3 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. * Makes F_CPU generic based on the SoC frequency Works for ESP32, ESP32C3, ESP32S2, ESP32S3 * Includes ESP32C3 in the F_CPU definition Necessary for ESP32 Arduino Core 2.0.x based on IDF 4.4 --------- Co-authored-by: Ali Devrim OGUZ <11381547+devrim-oguz@users.noreply.github.com>
1 parent 98f6d78 commit 85d179c
Copy full SHA for 85d179c

File tree

Expand file treeCollapse file tree

1 file changed

+4
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-0
lines changed

‎cores/esp32/esp32-hal.h

Copy file name to clipboardExpand all lines: cores/esp32/esp32-hal.h
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,12 @@ extern "C" {
4444
#ifndef F_CPU
4545
#if CONFIG_IDF_TARGET_ESP32 // ESP32/PICO-D4
4646
#define F_CPU (CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ * 1000000U)
47+
#elif CONFIG_IDF_TARGET_ESP32C3
48+
#define F_CPU (CONFIG_ESP32C3_DEFAULT_CPU_FREQ_MHZ * 1000000U)
4749
#elif CONFIG_IDF_TARGET_ESP32S2
4850
#define F_CPU (CONFIG_ESP32S2_DEFAULT_CPU_FREQ_MHZ * 1000000U)
51+
#elif CONFIG_IDF_TARGET_ESP32S3
52+
#define F_CPU (CONFIG_ESP32S3_DEFAULT_CPU_FREQ_MHZ * 1000000U)
4953
#endif
5054
#endif
5155

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.