components/esp32: add CPU frequency selection in menuconfig

Note that with WiFi stack enabled, system_init will reset frequency to 240MHz.
To make this setting useful, esp32-wifi-libs submodule needs to be updated.
This commit is contained in:
Ivan Grokhotkov
2016-09-13 18:10:58 +08:00
committed by Wu Jian Gang
parent e04e6b0c7f
commit 5ab769516d
5 changed files with 102 additions and 1 deletions

View File

@@ -22,6 +22,7 @@
#include "soc/dport_reg.h"
#include "soc/io_mux_reg.h"
#include "soc/cpu.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
@@ -201,6 +202,8 @@ static void do_global_ctors(void) {
extern esp_err_t app_main(void *ctx);
void user_start_cpu0(void) {
esp_set_cpu_freq(); // set CPU frequency configured in menuconfig
uart_div_modify(0, (80000000 << 4) / 115200);
ets_setup_syscalls();
do_global_ctors();
esp_ipc_init();