Unverified Commit 158bcf69 authored by Jan Procházka's avatar Jan Procházka Committed by GitHub

Add 120Mhz cpu frequency option to setCpuFrequencyMhz() (#8956)

* Allow setting 120MHz cpu freq

* add 120MHz to C6 frequency menu
parent 1a7a8934
...@@ -430,6 +430,8 @@ esp32c6.menu.PartitionScheme.custom.upload.maximum_size=16777216 ...@@ -430,6 +430,8 @@ esp32c6.menu.PartitionScheme.custom.upload.maximum_size=16777216
esp32c6.menu.CPUFreq.160=160MHz (WiFi) esp32c6.menu.CPUFreq.160=160MHz (WiFi)
esp32c6.menu.CPUFreq.160.build.f_cpu=160000000L esp32c6.menu.CPUFreq.160.build.f_cpu=160000000L
esp32c6.menu.CPUFreq.120=120MHz (WiFi)
esp32c6.menu.CPUFreq.120.build.f_cpu=120000000L
esp32c6.menu.CPUFreq.80=80MHz (WiFi) esp32c6.menu.CPUFreq.80=80MHz (WiFi)
esp32c6.menu.CPUFreq.80.build.f_cpu=80000000L esp32c6.menu.CPUFreq.80.build.f_cpu=80000000L
esp32c6.menu.CPUFreq.40=40MHz esp32c6.menu.CPUFreq.40=40MHz
...@@ -188,11 +188,11 @@ bool setCpuFrequencyMhz(uint32_t cpu_freq_mhz){ ...@@ -188,11 +188,11 @@ bool setCpuFrequencyMhz(uint32_t cpu_freq_mhz){
} }
#endif #endif
#ifndef CONFIG_IDF_TARGET_ESP32H2 #ifndef CONFIG_IDF_TARGET_ESP32H2
if(cpu_freq_mhz > xtal && cpu_freq_mhz != 240 && cpu_freq_mhz != 160 && cpu_freq_mhz != 80){ if(cpu_freq_mhz > xtal && cpu_freq_mhz != 240 && cpu_freq_mhz != 160 && cpu_freq_mhz != 120 && cpu_freq_mhz != 80){
if(xtal >= RTC_XTAL_FREQ_40M){ if(xtal >= RTC_XTAL_FREQ_40M){
log_e("Bad frequency: %u MHz! Options are: 240, 160, 80, %u, %u and %u MHz", cpu_freq_mhz, xtal, xtal/2, xtal/4); log_e("Bad frequency: %u MHz! Options are: 240, 160, 120, 80, %u, %u and %u MHz", cpu_freq_mhz, xtal, xtal/2, xtal/4);
} else { } else {
log_e("Bad frequency: %u MHz! Options are: 240, 160, 80, %u and %u MHz", cpu_freq_mhz, xtal, xtal/2); log_e("Bad frequency: %u MHz! Options are: 240, 160, 120, 80, %u and %u MHz", cpu_freq_mhz, xtal, xtal/2);
} }
return false; return false;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment