mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
5a4759cfc0
The commit defines a new common CPU symbol `CPU_COMMON_ESP32X` in Kconfig that is used by all `CPU_FAM_ESP32x` symbols which selects features, modules and packages that are common for all ESP32x SoC variants. This avoids the selection of features, modules and packages again and again for each ESP32x SoC variant.
101 lines
3.0 KiB
Plaintext
101 lines
3.0 KiB
Plaintext
# Copyright (c) 2020 HAW Hamburg
|
|
# 2022 Gunar Schorcht
|
|
#
|
|
# This file is subject to the terms and conditions of the GNU Lesser
|
|
# General Public License v2.1. See the file LICENSE in the top level
|
|
# directory for more details.
|
|
|
|
config CPU_FAM_ESP32
|
|
bool
|
|
select CPU_COMMON_ESP32X
|
|
select CPU_CORE_XTENSA_LX6
|
|
select HAS_BLE_NIMBLE
|
|
select HAS_BLE_NIMBLE_NETIF
|
|
select HAS_ESP_BLE
|
|
select HAS_ESP_BLE_ESP32
|
|
select HAS_PUF_SRAM
|
|
|
|
config CPU_FAM
|
|
default "esp32" if CPU_FAM_ESP32
|
|
|
|
## CPU Models
|
|
config CPU_MODEL_ESP32_WROOM_32
|
|
bool
|
|
select CPU_FAM_ESP32
|
|
|
|
config CPU_MODEL_ESP32_WROVER
|
|
bool
|
|
select CPU_FAM_ESP32
|
|
select HAS_ESP_SPI_RAM
|
|
|
|
config CPU_MODEL_ESP32_WROVER_B
|
|
bool
|
|
select CPU_FAM_ESP32
|
|
select HAS_ESP_SPI_RAM
|
|
|
|
config CPU_MODEL_ESP32_WROVER_E
|
|
bool
|
|
select CPU_FAM_ESP32
|
|
select HAS_ESP_SPI_RAM
|
|
|
|
config CPU_MODEL_ESP32_D0WD
|
|
bool
|
|
select CPU_FAM_ESP32
|
|
|
|
config CPU_MODEL
|
|
depends on CPU_FAM_ESP32
|
|
default "esp32-wroom_32" if CPU_MODEL_ESP32_WROOM_32
|
|
default "esp32-wrover" if CPU_MODEL_ESP32_WROVER
|
|
default "esp32-wrover" if CPU_MODEL_ESP32_WROVER_B
|
|
default "esp32-wrover" if CPU_MODEL_ESP32_WROVER_E
|
|
default "esp32-d0wd" if CPU_MODEL_ESP32_D0WD
|
|
|
|
if CPU_FAM_ESP32
|
|
|
|
menu "ESP32 specific configurations"
|
|
depends on TEST_KCONFIG
|
|
depends on HAS_ARCH_ESP32
|
|
|
|
# define configuration menu entries for ESP32 variant (family)
|
|
|
|
choice
|
|
bool "CPU clock frequency"
|
|
default ESP32_DEFAULT_CPU_FREQ_MHZ_80
|
|
help
|
|
CPU clock frequency used (default 80 MHz).
|
|
Please note that peripherals such as I2C or SPI might not work at
|
|
the specified clock frequency if the selected CPU clock frequency
|
|
is too low. These peripherals are clocked by the APB clock, which
|
|
has a clock rate of 80 MHz for CPU clock frequencies greater than
|
|
or equal to 80 MHz, but is equal to the CPU clock frequency for
|
|
CPU clock frequencies less than 80 MHz. Thus, for SPI, the APB
|
|
clock rate must be at least five times the SPI clock rate. For the
|
|
I2C hardware implementation, the APB clock rate must be at least
|
|
40 times the I2C clock rate. For the I2C software implementation,
|
|
the maximum I2C clock rate is 1/200 times the CPU clock rate.
|
|
|
|
config ESP32_DEFAULT_CPU_FREQ_MHZ_2
|
|
bool "2 MHz"
|
|
config ESP32_DEFAULT_CPU_FREQ_MHZ_5
|
|
bool "5 MHz"
|
|
config ESP32_DEFAULT_CPU_FREQ_MHZ_10
|
|
bool "10 MHz"
|
|
config ESP32_DEFAULT_CPU_FREQ_MHZ_20
|
|
bool "20 MHz"
|
|
config ESP32_DEFAULT_CPU_FREQ_MHZ_40
|
|
bool "40 MHz"
|
|
config ESP32_DEFAULT_CPU_FREQ_MHZ_80
|
|
bool "80 MHz"
|
|
config ESP32_DEFAULT_CPU_FREQ_MHZ_160
|
|
bool "160 MHz"
|
|
config ESP32_DEFAULT_CPU_FREQ_MHZ_240
|
|
bool "240 MHz"
|
|
endchoice
|
|
|
|
# import configuration menu entries that are common for all ESP32x SoCs
|
|
rsource "Kconfig.common"
|
|
|
|
endmenu
|
|
|
|
endif # CPU_FAM_ESP32
|