forked from espressif/esp-idf
Merge branch 'chip/esp32c61_mp_support_wifi' into 'master'
esp32c61 mp support wifi See merge request espressif/esp-idf!32960
This commit is contained in:
164
components/esp_coex/esp32c61/esp_coex_adapter.c
Normal file
164
components/esp_coex/esp32c61/esp_coex_adapter.c
Normal file
@ -0,0 +1,164 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
#include "freertos/queue.h"
|
||||
#include "freertos/semphr.h"
|
||||
#include "freertos/portmacro.h"
|
||||
#include "esp_heap_caps.h"
|
||||
#include "esp_timer.h"
|
||||
#include "soc/rtc.h"
|
||||
#include "esp_private/esp_clk.h"
|
||||
#include "private/esp_coexist_adapter.h"
|
||||
#include "esp32c61/rom/ets_sys.h"
|
||||
|
||||
#define TAG "esp_coex_adapter"
|
||||
|
||||
#define OSI_FUNCS_TIME_BLOCKING 0xffffffff
|
||||
|
||||
bool IRAM_ATTR esp_coex_common_env_is_chip_wrapper(void)
|
||||
{
|
||||
#ifdef CONFIG_IDF_ENV_FPGA
|
||||
return false;
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
void *esp_coex_common_spin_lock_create_wrapper(void)
|
||||
{
|
||||
portMUX_TYPE tmp = portMUX_INITIALIZER_UNLOCKED;
|
||||
void *mux = malloc(sizeof(portMUX_TYPE));
|
||||
|
||||
if (mux) {
|
||||
memcpy(mux, &tmp, sizeof(portMUX_TYPE));
|
||||
return mux;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
uint32_t IRAM_ATTR esp_coex_common_int_disable_wrapper(void *wifi_int_mux)
|
||||
{
|
||||
if (xPortInIsrContext()) {
|
||||
portENTER_CRITICAL_ISR(wifi_int_mux);
|
||||
} else {
|
||||
portENTER_CRITICAL(wifi_int_mux);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void IRAM_ATTR esp_coex_common_int_restore_wrapper(void *wifi_int_mux, uint32_t tmp)
|
||||
{
|
||||
if (xPortInIsrContext()) {
|
||||
portEXIT_CRITICAL_ISR(wifi_int_mux);
|
||||
} else {
|
||||
portEXIT_CRITICAL(wifi_int_mux);
|
||||
}
|
||||
}
|
||||
|
||||
void IRAM_ATTR esp_coex_common_task_yield_from_isr_wrapper(void)
|
||||
{
|
||||
portYIELD_FROM_ISR();
|
||||
}
|
||||
|
||||
void *esp_coex_common_semphr_create_wrapper(uint32_t max, uint32_t init)
|
||||
{
|
||||
return (void *)xSemaphoreCreateCounting(max, init);
|
||||
}
|
||||
|
||||
void esp_coex_common_semphr_delete_wrapper(void *semphr)
|
||||
{
|
||||
vSemaphoreDelete(semphr);
|
||||
}
|
||||
|
||||
int32_t esp_coex_common_semphr_take_wrapper(void *semphr, uint32_t block_time_tick)
|
||||
{
|
||||
if (block_time_tick == OSI_FUNCS_TIME_BLOCKING) {
|
||||
return (int32_t)xSemaphoreTake(semphr, portMAX_DELAY);
|
||||
} else {
|
||||
return (int32_t)xSemaphoreTake(semphr, block_time_tick);
|
||||
}
|
||||
}
|
||||
|
||||
int32_t esp_coex_common_semphr_give_wrapper(void *semphr)
|
||||
{
|
||||
return (int32_t)xSemaphoreGive(semphr);
|
||||
}
|
||||
|
||||
void IRAM_ATTR esp_coex_common_timer_disarm_wrapper(void *timer)
|
||||
{
|
||||
ets_timer_disarm(timer);
|
||||
}
|
||||
|
||||
void esp_coex_common_timer_done_wrapper(void *ptimer)
|
||||
{
|
||||
ets_timer_done(ptimer);
|
||||
}
|
||||
|
||||
void esp_coex_common_timer_setfn_wrapper(void *ptimer, void *pfunction, void *parg)
|
||||
{
|
||||
ets_timer_setfn(ptimer, pfunction, parg);
|
||||
}
|
||||
|
||||
void IRAM_ATTR esp_coex_common_timer_arm_us_wrapper(void *ptimer, uint32_t us, bool repeat)
|
||||
{
|
||||
ets_timer_arm_us(ptimer, us, repeat);
|
||||
}
|
||||
|
||||
uint32_t esp_coex_common_clk_slowclk_cal_get_wrapper(void)
|
||||
{
|
||||
/* The bit width of WiFi light sleep clock calibration is 12 while the one of
|
||||
* system is 19. It should shift 19 - 12 = 7.
|
||||
*/
|
||||
return (esp_clk_slowclk_cal_get() >> (RTC_CLK_CAL_FRACT - SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH));
|
||||
}
|
||||
|
||||
void *IRAM_ATTR esp_coex_common_malloc_internal_wrapper(size_t size)
|
||||
{
|
||||
return heap_caps_malloc(size, MALLOC_CAP_8BIT | MALLOC_CAP_DMA | MALLOC_CAP_INTERNAL);
|
||||
}
|
||||
|
||||
/* static wrapper */
|
||||
|
||||
static int32_t IRAM_ATTR esp_coex_semphr_take_from_isr_wrapper(void *semphr, void *hptw)
|
||||
{
|
||||
return (int32_t)xSemaphoreTakeFromISR(semphr, hptw);
|
||||
}
|
||||
|
||||
static int32_t IRAM_ATTR esp_coex_semphr_give_from_isr_wrapper(void *semphr, void *hptw)
|
||||
{
|
||||
return (int32_t)xSemaphoreGiveFromISR(semphr, hptw);
|
||||
}
|
||||
|
||||
coex_adapter_funcs_t g_coex_adapter_funcs = {
|
||||
._version = COEX_ADAPTER_VERSION,
|
||||
._task_yield_from_isr = esp_coex_common_task_yield_from_isr_wrapper,
|
||||
._semphr_create = esp_coex_common_semphr_create_wrapper,
|
||||
._semphr_delete = esp_coex_common_semphr_delete_wrapper,
|
||||
._semphr_take_from_isr = esp_coex_semphr_take_from_isr_wrapper,
|
||||
._semphr_give_from_isr = esp_coex_semphr_give_from_isr_wrapper,
|
||||
._semphr_take = esp_coex_common_semphr_take_wrapper,
|
||||
._semphr_give = esp_coex_common_semphr_give_wrapper,
|
||||
._is_in_isr = xPortInIsrContext,
|
||||
._malloc_internal = esp_coex_common_malloc_internal_wrapper,
|
||||
._free = free,
|
||||
._esp_timer_get_time = esp_timer_get_time,
|
||||
._env_is_chip = esp_coex_common_env_is_chip_wrapper,
|
||||
._timer_disarm = esp_coex_common_timer_disarm_wrapper,
|
||||
._timer_done = esp_coex_common_timer_done_wrapper,
|
||||
._timer_setfn = esp_coex_common_timer_setfn_wrapper,
|
||||
._timer_arm_us = esp_coex_common_timer_arm_us_wrapper,
|
||||
._magic = COEX_ADAPTER_MAGIC,
|
||||
};
|
Submodule components/esp_coex/lib updated: 3880b604ad...6a3c4b3121
@ -22,7 +22,7 @@ case $IDF_TARGET in
|
||||
esp32s3)
|
||||
PREFIX=xtensa-esp32s3-elf-
|
||||
;;
|
||||
esp32c2|esp32c3|esp32c6|esp32h2|esp32c5)
|
||||
esp32c2|esp32c3|esp32c6|esp32h2|esp32c5|esp32c61)
|
||||
PREFIX=riscv32-esp-elf-
|
||||
;;
|
||||
*)
|
||||
|
@ -4,8 +4,8 @@ if(${idf_target} STREQUAL "linux")
|
||||
return() # This component is not supported by the POSIX/Linux simulator
|
||||
endif()
|
||||
|
||||
if(IDF_TARGET STREQUAL "esp32p4" OR IDF_TARGET STREQUAL "esp32c61")
|
||||
# TODO: IDF-7460, IDF-8851, IDF-9553
|
||||
if(IDF_TARGET STREQUAL "esp32p4")
|
||||
# TODO: IDF-7460
|
||||
idf_component_register()
|
||||
return()
|
||||
endif()
|
||||
|
24
components/esp_phy/esp32c61/include/btbb_retention_reg.h
Normal file
24
components/esp_phy/esp32c61/include/btbb_retention_reg.h
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// btbb sleep retention reg
|
||||
|
||||
#define BB_PART_0_SIZE 93
|
||||
#define BB_PART_1_SIZE 62
|
||||
#define BB_PART_2_SIZE 19
|
||||
#define BB_PART_0_ADDR 0x600A2000
|
||||
#define BB_PART_1_ADDR 0x600A2800
|
||||
#define BB_PART_2_ADDR 0x600A2C00
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
64
components/esp_phy/esp32c61/include/phy_init_data.h
Normal file
64
components/esp_phy/esp32c61/include/phy_init_data.h
Normal file
@ -0,0 +1,64 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef PHY_INIT_DATA_H
|
||||
#define PHY_INIT_DATA_H /* don't use #pragma once here, we compile this file sometimes */
|
||||
#include <stdint.h>
|
||||
#include "esp_phy_init.h"
|
||||
#include "sdkconfig.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
// constrain a value between 'low' and 'high', inclusive
|
||||
#define LIMIT(val, low, high) ((val < low) ? low : (val > high) ? high : val)
|
||||
#define PHY_INIT_MAGIC "PHYINIT"
|
||||
#define PHY_INIT_MAGIC_LEN 8 // should be strlen(PHY_INIT_MAGIC) + 1
|
||||
|
||||
// define the lowest tx power as LOWEST_PHY_TX_POWER
|
||||
#define PHY_TX_POWER_LOWEST LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 0, 52)
|
||||
#define PHY_TX_POWER_OFFSET 2
|
||||
#define PHY_TX_POWER_NUM 14
|
||||
|
||||
#if CONFIG_ESP_PHY_MULTIPLE_INIT_DATA_BIN
|
||||
#define PHY_CRC_ALGORITHM 1
|
||||
#define PHY_COUNTRY_CODE_LEN 2
|
||||
#define PHY_INIT_DATA_TYPE_OFFSET 254
|
||||
#define PHY_SUPPORT_MULTIPLE_BIN_OFFSET 253
|
||||
#endif
|
||||
|
||||
extern const char phy_init_magic_pre[];
|
||||
extern const esp_phy_init_data_t phy_init_data;
|
||||
extern const char phy_init_magic_post[];
|
||||
|
||||
#if CONFIG_ESP_PHY_MULTIPLE_INIT_DATA_BIN
|
||||
/**
|
||||
* @brief PHY init data control information structure
|
||||
*/
|
||||
typedef struct {
|
||||
uint8_t control_info_checksum[4]; /*!< 4-byte control information checksum */
|
||||
uint8_t multiple_bin_checksum[4]; /*!< 4-byte multiple bin checksum */
|
||||
uint8_t check_algorithm; /*!< check algorithm */
|
||||
uint8_t version; /*!< PHY init data bin version */
|
||||
uint8_t number; /*!< PHY init data bin number */
|
||||
uint8_t length[2]; /*!< Length of each PHY init data bin */
|
||||
uint8_t reserved[19]; /*!< 19-byte reserved */
|
||||
} __attribute__ ((packed)) phy_control_info_data_t;
|
||||
|
||||
/**
|
||||
* @brief Country corresponds to PHY init data type structure
|
||||
*/
|
||||
typedef struct {
|
||||
char cc[PHY_COUNTRY_CODE_LEN];
|
||||
uint8_t type;
|
||||
} phy_country_to_bin_type_t;
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* PHY_INIT_DATA_H */
|
147
components/esp_phy/esp32c61/phy_init_data.c
Normal file
147
components/esp_phy/esp32c61/phy_init_data.c
Normal file
@ -0,0 +1,147 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "sdkconfig.h"
|
||||
#include "phy_init_data.h"
|
||||
|
||||
|
||||
const char __attribute__((section(".rodata"))) phy_init_magic_pre[] = PHY_INIT_MAGIC;
|
||||
|
||||
/**
|
||||
* @brief Structure containing default recommended PHY initialization parameters.
|
||||
*/
|
||||
const esp_phy_init_data_t phy_init_data= { {
|
||||
0x1,
|
||||
0x0,
|
||||
LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 0, 0x50),
|
||||
LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 0, 0x50),
|
||||
LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 0, 0x50),
|
||||
LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 0, 0x50),
|
||||
LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 0, 0x34),
|
||||
LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 0, 0x34),
|
||||
LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 0, 0x4c),
|
||||
LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 0, 0x4c),
|
||||
LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 0, 0x30),
|
||||
LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 0, 0x30),
|
||||
LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 0, 0x28),
|
||||
LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 0, 0x24),
|
||||
LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 0, 0x24),
|
||||
LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 0, 0x24),
|
||||
LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 0, 0x4c),
|
||||
LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 0, 0x4c),
|
||||
LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 0, 0x2c),
|
||||
LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 0, 0x2c),
|
||||
0x0,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0x51
|
||||
} };
|
||||
|
||||
const char __attribute__((section(".rodata"))) phy_init_magic_post[] = PHY_INIT_MAGIC;
|
BIN
components/esp_phy/esp32c61/phy_multiple_init_data.bin
Normal file
BIN
components/esp_phy/esp32c61/phy_multiple_init_data.bin
Normal file
Binary file not shown.
Submodule components/esp_phy/lib updated: 24ea5ada50...772432d2e9
@ -64,7 +64,7 @@ static _lock_t s_phy_access_lock;
|
||||
|
||||
#if SOC_PM_SUPPORT_MODEM_PD || SOC_PM_SUPPORT_WIFI_PD
|
||||
#if !SOC_PMU_SUPPORTED
|
||||
#if !CONFIG_IDF_TARGET_ESP32C5 // TODO: [ESP32C5] IDF-8667
|
||||
#if !(CONFIG_IDF_TARGET_ESP32C5 || CONFIG_IDF_TARGET_ESP32C61) // TODO: [ESP32C5] IDF-8667
|
||||
static DRAM_ATTR struct {
|
||||
int count; /* power on count of wifi and bt power domain */
|
||||
_lock_t lock;
|
||||
@ -248,7 +248,6 @@ void esp_phy_enable(esp_phy_modem_t modem)
|
||||
phy_update_wifi_mac_time(false, s_phy_rf_en_ts);
|
||||
#endif
|
||||
esp_phy_common_clock_enable();
|
||||
|
||||
if (s_is_phy_calibrated == false) {
|
||||
esp_phy_load_cal_and_init();
|
||||
s_is_phy_calibrated = true;
|
||||
@ -341,7 +340,7 @@ void IRAM_ATTR esp_wifi_bt_power_domain_on(void)
|
||||
{
|
||||
#if SOC_PM_SUPPORT_MODEM_PD || SOC_PM_SUPPORT_WIFI_PD
|
||||
#if !SOC_PMU_SUPPORTED
|
||||
#if !CONFIG_IDF_TARGET_ESP32C5 // TODO: [ESP32C5] IDF-8667
|
||||
#if !(CONFIG_IDF_TARGET_ESP32C5 || CONFIG_IDF_TARGET_ESP32C61) // TODO: [ESP32C5] IDF-8667
|
||||
_lock_acquire(&s_wifi_bt_pd_controller.lock);
|
||||
if (s_wifi_bt_pd_controller.count++ == 0) {
|
||||
CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_WIFI_FORCE_PD);
|
||||
@ -368,7 +367,7 @@ void esp_wifi_bt_power_domain_off(void)
|
||||
{
|
||||
#if SOC_PM_SUPPORT_MODEM_PD || SOC_PM_SUPPORT_WIFI_PD
|
||||
#if !SOC_PMU_SUPPORTED
|
||||
#if !CONFIG_IDF_TARGET_ESP32C5 // TODO: [ESP32C5] IDF-8667
|
||||
#if !(CONFIG_IDF_TARGET_ESP32C5 || CONFIG_IDF_TARGET_ESP32C61) // TODO: [ESP32C5] IDF-8667
|
||||
_lock_acquire(&s_wifi_bt_pd_controller.lock);
|
||||
if (--s_wifi_bt_pd_controller.count == 0) {
|
||||
SET_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_WIFI_FORCE_ISO);
|
||||
|
@ -190,6 +190,13 @@ else() # Regular app build
|
||||
rom_linker_script("coexist")
|
||||
rom_linker_script("net80211")
|
||||
rom_linker_script("pp")
|
||||
elseif(target STREQUAL "esp32c61")
|
||||
# esp32c61.rom.api.ld has been split to several lds by components.
|
||||
# esp32c61.rom.api.ld is still reserved to map the APIs
|
||||
rom_linker_script("phy")
|
||||
rom_linker_script("coexist")
|
||||
rom_linker_script("net80211")
|
||||
rom_linker_script("pp")
|
||||
endif()
|
||||
|
||||
|
||||
|
@ -272,7 +272,7 @@ wdev_mac_special_reg_store = 0x40000fd0;
|
||||
wdev_mac_wakeup = 0x40000fd4;
|
||||
wdev_mac_sleep = 0x40000fd8;
|
||||
wDev_ProcessFiq = 0x40000fdc;
|
||||
wDev_ProcessRxSucData = 0x40000fe0;
|
||||
/*wDev_ProcessRxSucData = 0x40000fe0;*/
|
||||
wdevProcessRxSucDataAll = 0x40000fe4;
|
||||
wdev_csi_len_align = 0x40000fe8;
|
||||
wDev_IndicateBeaconMemoryFrame = 0x40000fec;
|
||||
|
@ -40,7 +40,7 @@ ieee80211_encap_esfbuf = 0x40000ac8;
|
||||
ieee80211_is_tx_allowed = 0x40000acc;
|
||||
ieee80211_output_pending_eb = 0x40000ad0;
|
||||
ieee80211_output_process = 0x40000ad4;
|
||||
ieee80211_set_tx_desc = 0x40000ad8;
|
||||
/*ieee80211_set_tx_desc = 0x40000ad8;*/
|
||||
ieee80211_classify = 0x40000adc;
|
||||
ieee80211_copy_eb_header = 0x40000ae0;
|
||||
ieee80211_recycle_cache_eb = 0x40000ae4;
|
||||
|
@ -305,5 +305,7 @@ phy_rate_to_index = 0x400014b8;
|
||||
phy_get_target_pwr = 0x400014bc;
|
||||
phy_get_max_pwr = 0x400014c0;
|
||||
phy_get_pwr_index = 0x400014c4;
|
||||
phy_chip_set_chan_ana = 0x40005a8a;
|
||||
/* Data (.data, .bss, .rodata) */
|
||||
phy_param_rom = 0x4084fc6c;
|
||||
rom_phyFuns = 0x4084fb84;
|
||||
|
@ -76,14 +76,14 @@ lmacReachLongLimit = 0x40000c28;
|
||||
lmacReachShortLimit = 0x40000c2c;
|
||||
lmacRecycleMPDU = 0x40000c30;
|
||||
lmacRxDone = 0x40000c34;
|
||||
lmacSetTxFrame = 0x40000c38;
|
||||
/*lmacSetTxFrame = 0x40000c38;*/
|
||||
lmacTxDone = 0x40000c3c;
|
||||
lmacTxFrame = 0x40000c40;
|
||||
lmacDisableTransmit = 0x40000c44;
|
||||
lmacDiscardFrameExchangeSequence = 0x40000c48;
|
||||
lmacProcessCollision = 0x40000c4c;
|
||||
lmacProcessAckTimeout = 0x40000c50;
|
||||
lmacProcessShortRetryFail = 0x40000c54;
|
||||
/*lmacProcessShortRetryFail = 0x40000c54;*/
|
||||
lmacProcessCollisions_task = 0x40000c58;
|
||||
lmacProcessTxRtsError = 0x40000c5c;
|
||||
lmacProcessTxError = 0x40000c60;
|
||||
@ -102,7 +102,7 @@ mac_tx_set_plcp1 = 0x40000c90;
|
||||
mac_tx_set_plcp2 = 0x40000c94;
|
||||
mac_tx_set_len = 0x40000c98;
|
||||
mac_tx_set_htsig = 0x40000c9c;
|
||||
mac_tx_set_hesig = 0x40000ca0;
|
||||
/*mac_tx_set_hesig = 0x40000ca0;*/
|
||||
mac_tx_set_tb = 0x40000ca4;
|
||||
mac_tx_set_mplen = 0x40000ca8;
|
||||
mac_tx_set_txop_q = 0x40000cac;
|
||||
@ -119,7 +119,7 @@ pm_local_tsf_process = 0x40000cd4;
|
||||
pm_set_beacon_filter = 0x40000cd8;
|
||||
pm_is_in_wifi_slice_threshold = 0x40000cdc;
|
||||
pm_is_waked = 0x40000ce0;
|
||||
pm_keep_alive = 0x40000ce4;
|
||||
/*pm_keep_alive = 0x40000ce4;*/
|
||||
pm_on_beacon_rx = 0x40000ce8;
|
||||
pm_on_data_rx = 0x40000cec;
|
||||
pm_on_data_tx = 0x40000cf0;
|
||||
@ -130,14 +130,14 @@ pm_on_isr_set_twt_target = 0x40000d00;
|
||||
pm_on_isr_twt_wake = 0x40000d04;
|
||||
pm_on_tsf_timer = 0x40000d08;
|
||||
pm_on_twt_force_tx = 0x40000d0c;
|
||||
pm_parse_beacon = 0x40000d10;
|
||||
pm_process_tim = 0x40000d14;
|
||||
/*pm_parse_beacon = 0x40000d10;*/
|
||||
/*pm_process_tim = 0x40000d14;*/
|
||||
pm_rx_beacon_process = 0x40000d18;
|
||||
pm_rx_data_process = 0x40000d1c;
|
||||
pm_sleep = 0x40000d20;
|
||||
pm_sleep_for = 0x40000d24;
|
||||
pm_tbtt_process = 0x40000d28;
|
||||
pm_tx_data_done_process = 0x40000d2c;
|
||||
/*pm_tbtt_process = 0x40000d28;*/
|
||||
/*pm_tx_data_done_process = 0x40000d2c;*/
|
||||
pm_allow_tx = 0x40000d30;
|
||||
pm_extend_tbtt_adaptive_servo = 0x40000d34;
|
||||
pm_scale_listen_interval = 0x40000d38;
|
||||
@ -146,7 +146,7 @@ pm_disconnected_wake = 0x40000d40;
|
||||
/*pm_tx_data_process = 0x40000d44;*/
|
||||
pm_is_twt_awake = 0x40000d48;
|
||||
pm_enable_twt_keep_alive = 0x40000d4c;
|
||||
pm_twt_on_tsf_timer = 0x40000d50;
|
||||
/*pm_twt_on_tsf_timer = 0x40000d50;*/
|
||||
pm_twt_process = 0x40000d54;
|
||||
pm_is_twt_start = 0x40000d58;
|
||||
pm_twt_set_target_wdev_time = 0x40000d5c;
|
||||
@ -197,7 +197,7 @@ ppSearchTxQueue = 0x40000e0c;
|
||||
ppSearchTxframe = 0x40000e10;
|
||||
ppSelectNextQueue = 0x40000e14;
|
||||
ppSubFromAMPDU = 0x40000e18;
|
||||
ppTask = 0x40000e1c;
|
||||
/*ppTask = 0x40000e1c;*/
|
||||
ppTxPkt = 0x40000e20;
|
||||
ppTxProtoProc = 0x40000e24;
|
||||
ppTxqUpdateBitmap = 0x40000e28;
|
||||
@ -247,7 +247,7 @@ rcUpSched = 0x40000ed4;
|
||||
rcReachRetryLimit = 0x40000ed8;
|
||||
rcGetDCMMaxRate = 0x40000edc;
|
||||
rcGetSMPDURate = 0x40000ee0;
|
||||
rcGetRate = 0x40000ee4;
|
||||
/*rcGetRate = 0x40000ee4;*/
|
||||
rx11AXRate2AMPDULimit = 0x40000ee8;
|
||||
rx11NRate2AMPDULimit = 0x40000eec;
|
||||
rssi_margin = 0x40000ef0;
|
||||
@ -263,7 +263,7 @@ trcAmpduSetState = 0x40000f14;
|
||||
trc_set_bf_report_rate = 0x40000f18;
|
||||
trc_onPPTxDone = 0x40000f1c;
|
||||
wDevCheckBlockError = 0x40000f20;
|
||||
wDev_AppendRxBlocks = 0x40000f24;
|
||||
/*wDev_AppendRxBlocks = 0x40000f24;*/
|
||||
wDev_DiscardFrame = 0x40000f28;
|
||||
wDev_GetNoiseFloor = 0x40000f2c;
|
||||
wDev_IndicateAmpdu = 0x40000f30;
|
||||
@ -275,7 +275,7 @@ wdev_mac_special_reg_store = 0x40000f44;
|
||||
wdev_mac_wakeup = 0x40000f48;
|
||||
wdev_mac_sleep = 0x40000f4c;
|
||||
wDev_ProcessFiq = 0x40000f50;
|
||||
wDev_ProcessRxSucData = 0x40000f54;
|
||||
/*wDev_ProcessRxSucData = 0x40000f54;*/
|
||||
wdevProcessRxSucDataAll = 0x40000f58;
|
||||
wdev_csi_len_align = 0x40000f5c;
|
||||
wDev_IndicateBeaconMemoryFrame = 0x40000f60;
|
||||
|
@ -63,17 +63,29 @@ extern void wifi_apb80m_release(void);
|
||||
|
||||
IRAM_ATTR void *wifi_malloc(size_t size)
|
||||
{
|
||||
#if CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP
|
||||
return heap_caps_malloc_prefer(size, 2, MALLOC_CAP_DEFAULT | MALLOC_CAP_SPIRAM, MALLOC_CAP_DEFAULT | MALLOC_CAP_INTERNAL);
|
||||
#else
|
||||
return malloc(size);
|
||||
#endif
|
||||
}
|
||||
|
||||
IRAM_ATTR void *wifi_realloc(void *ptr, size_t size)
|
||||
{
|
||||
#if CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP
|
||||
return heap_caps_realloc_prefer(ptr, size, 2, MALLOC_CAP_DEFAULT | MALLOC_CAP_SPIRAM, MALLOC_CAP_DEFAULT | MALLOC_CAP_INTERNAL);
|
||||
#else
|
||||
return realloc(ptr, size);
|
||||
#endif
|
||||
}
|
||||
|
||||
IRAM_ATTR void *wifi_calloc(size_t n, size_t size)
|
||||
{
|
||||
#if CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP
|
||||
return heap_caps_calloc_prefer(n, size, 2, MALLOC_CAP_DEFAULT | MALLOC_CAP_SPIRAM, MALLOC_CAP_DEFAULT | MALLOC_CAP_INTERNAL);
|
||||
#else
|
||||
return calloc(n, size);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void *IRAM_ATTR wifi_zalloc_wrapper(size_t size)
|
||||
@ -91,14 +103,47 @@ wifi_static_queue_t *wifi_create_queue(int queue_len, int item_size)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#if CONFIG_SPIRAM_USE_MALLOC
|
||||
/* Wi-Fi still use internal RAM */
|
||||
|
||||
queue->storage = heap_caps_calloc(1, sizeof(StaticQueue_t) + (queue_len * item_size), MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT);
|
||||
if (!queue->storage) {
|
||||
goto _error;
|
||||
}
|
||||
|
||||
queue->handle = xQueueCreateStatic(queue_len, item_size, ((uint8_t*)(queue->storage)) + sizeof(StaticQueue_t), (StaticQueue_t*)(queue->storage));
|
||||
|
||||
if (!queue->handle) {
|
||||
goto _error;
|
||||
}
|
||||
|
||||
return queue;
|
||||
|
||||
_error:
|
||||
if (queue) {
|
||||
if (queue->storage) {
|
||||
free(queue->storage);
|
||||
}
|
||||
|
||||
free(queue);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
#else
|
||||
queue->handle = xQueueCreate(queue_len, item_size);
|
||||
return queue;
|
||||
#endif
|
||||
}
|
||||
|
||||
void wifi_delete_queue(wifi_static_queue_t *queue)
|
||||
{
|
||||
if (queue) {
|
||||
vQueueDelete(queue->handle);
|
||||
#if CONFIG_SPIRAM_USE_MALLOC
|
||||
if (queue->storage) {
|
||||
free(queue->storage);
|
||||
}
|
||||
#endif
|
||||
free(queue);
|
||||
}
|
||||
}
|
||||
@ -207,7 +252,23 @@ static int32_t IRAM_ATTR mutex_unlock_wrapper(void *mutex)
|
||||
|
||||
static void *queue_create_wrapper(uint32_t queue_len, uint32_t item_size)
|
||||
{
|
||||
#if CONFIG_SPIRAM_USE_MALLOC
|
||||
/* Use xQueueCreateWithCaps() to allocate from SPIRAM */
|
||||
return (void *)xQueueCreateWithCaps(queue_len, item_size, MALLOC_CAP_SPIRAM);
|
||||
#else
|
||||
return (void *)xQueueCreate(queue_len, item_size);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void queue_delete_wrapper(void *queue)
|
||||
{
|
||||
if (queue) {
|
||||
#if CONFIG_SPIRAM_USE_MALLOC
|
||||
vQueueDeleteWithCaps(queue);
|
||||
#else
|
||||
vQueueDelete(queue);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
static int32_t queue_send_wrapper(void *queue, void *item, uint32_t block_time_tick)
|
||||
@ -587,7 +648,7 @@ wifi_osi_funcs_t g_wifi_osi_funcs = {
|
||||
._mutex_lock = mutex_lock_wrapper,
|
||||
._mutex_unlock = mutex_unlock_wrapper,
|
||||
._queue_create = queue_create_wrapper,
|
||||
._queue_delete = (void(*)(void *))vQueueDelete,
|
||||
._queue_delete = queue_delete_wrapper,
|
||||
._queue_send = queue_send_wrapper,
|
||||
._queue_send_from_isr = queue_send_from_isr_wrapper,
|
||||
._queue_send_to_back = queue_send_to_back_wrapper,
|
||||
|
749
components/esp_wifi/esp32c61/esp_adapter.c
Normal file
749
components/esp_wifi/esp32c61/esp_adapter.c
Normal file
@ -0,0 +1,749 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
#include "freertos/queue.h"
|
||||
#include "freertos/semphr.h"
|
||||
#include "freertos/event_groups.h"
|
||||
#include "freertos/portmacro.h"
|
||||
#include "riscv/interrupt.h"
|
||||
#include "esp_types.h"
|
||||
#include "esp_random.h"
|
||||
#include "esp_mac.h"
|
||||
#include "esp_task.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "esp_attr.h"
|
||||
#include "esp_log.h"
|
||||
#include "esp_event.h"
|
||||
#include "esp_heap_caps.h"
|
||||
#include "esp_timer.h"
|
||||
#include "esp_private/esp_modem_clock.h"
|
||||
#include "esp_private/wifi_os_adapter.h"
|
||||
#include "esp_private/wifi.h"
|
||||
#ifdef CONFIG_ESP_PHY_ENABLED
|
||||
#include "esp_phy_init.h"
|
||||
#include "phy_init_data.h"
|
||||
#endif
|
||||
#include "soc/rtc_cntl_periph.h"
|
||||
#include "soc/rtc.h"
|
||||
#include "esp_private/periph_ctrl.h"
|
||||
#include "esp_private/esp_clk.h"
|
||||
#include "nvs.h"
|
||||
#include "os.h"
|
||||
#include "esp_smartconfig.h"
|
||||
#ifdef CONFIG_ESP_COEX_ENABLED
|
||||
#include "private/esp_coexist_internal.h"
|
||||
#endif
|
||||
#include "esp32c61/rom/ets_sys.h"
|
||||
#include "private/esp_modem_wrapper.h"
|
||||
#include "esp_private/esp_modem_clock.h"
|
||||
|
||||
#if SOC_PM_MODEM_RETENTION_BY_REGDMA
|
||||
#include "esp_private/esp_regdma.h"
|
||||
#include "esp_private/sleep_retention.h"
|
||||
#endif
|
||||
|
||||
#define TAG "esp_adapter"
|
||||
|
||||
#ifdef CONFIG_PM_ENABLE
|
||||
extern void wifi_apb80m_request(void);
|
||||
extern void wifi_apb80m_release(void);
|
||||
#endif
|
||||
|
||||
IRAM_ATTR void *wifi_malloc(size_t size)
|
||||
{
|
||||
#if CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP
|
||||
return heap_caps_malloc_prefer(size, 2, MALLOC_CAP_DEFAULT | MALLOC_CAP_SPIRAM, MALLOC_CAP_DEFAULT | MALLOC_CAP_INTERNAL);
|
||||
#else
|
||||
return malloc(size);
|
||||
#endif
|
||||
}
|
||||
|
||||
IRAM_ATTR void *wifi_realloc(void *ptr, size_t size)
|
||||
{
|
||||
#if CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP
|
||||
return heap_caps_realloc_prefer(ptr, size, 2, MALLOC_CAP_DEFAULT | MALLOC_CAP_SPIRAM, MALLOC_CAP_DEFAULT | MALLOC_CAP_INTERNAL);
|
||||
#else
|
||||
return realloc(ptr, size);
|
||||
#endif
|
||||
}
|
||||
|
||||
IRAM_ATTR void *wifi_calloc(size_t n, size_t size)
|
||||
{
|
||||
#if CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP
|
||||
return heap_caps_calloc_prefer(n, size, 2, MALLOC_CAP_DEFAULT | MALLOC_CAP_SPIRAM, MALLOC_CAP_DEFAULT | MALLOC_CAP_INTERNAL);
|
||||
#else
|
||||
return calloc(n, size);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void *IRAM_ATTR wifi_zalloc_wrapper(size_t size)
|
||||
{
|
||||
void *ptr = wifi_calloc(1, size);
|
||||
return ptr;
|
||||
}
|
||||
|
||||
wifi_static_queue_t *wifi_create_queue(int queue_len, int item_size)
|
||||
{
|
||||
wifi_static_queue_t *queue = NULL;
|
||||
|
||||
queue = (wifi_static_queue_t *)heap_caps_malloc(sizeof(wifi_static_queue_t), MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT);
|
||||
if (!queue) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#if CONFIG_SPIRAM_USE_MALLOC
|
||||
/* Wi-Fi still use internal RAM */
|
||||
|
||||
queue->storage = heap_caps_calloc(1, sizeof(StaticQueue_t) + (queue_len * item_size), MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT);
|
||||
if (!queue->storage) {
|
||||
goto _error;
|
||||
}
|
||||
|
||||
queue->handle = xQueueCreateStatic(queue_len, item_size, ((uint8_t*)(queue->storage)) + sizeof(StaticQueue_t), (StaticQueue_t*)(queue->storage));
|
||||
|
||||
if (!queue->handle) {
|
||||
goto _error;
|
||||
}
|
||||
|
||||
return queue;
|
||||
|
||||
_error:
|
||||
if (queue) {
|
||||
if (queue->storage) {
|
||||
free(queue->storage);
|
||||
}
|
||||
|
||||
free(queue);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
#else
|
||||
queue->handle = xQueueCreate(queue_len, item_size);
|
||||
return queue;
|
||||
#endif
|
||||
}
|
||||
|
||||
void wifi_delete_queue(wifi_static_queue_t *queue)
|
||||
{
|
||||
if (queue) {
|
||||
vQueueDelete(queue->handle);
|
||||
#if CONFIG_SPIRAM_USE_MALLOC
|
||||
if (queue->storage) {
|
||||
free(queue->storage);
|
||||
}
|
||||
#endif
|
||||
free(queue);
|
||||
}
|
||||
}
|
||||
|
||||
static void *wifi_create_queue_wrapper(int queue_len, int item_size)
|
||||
{
|
||||
return wifi_create_queue(queue_len, item_size);
|
||||
}
|
||||
|
||||
static void wifi_delete_queue_wrapper(void *queue)
|
||||
{
|
||||
wifi_delete_queue(queue);
|
||||
}
|
||||
|
||||
static void set_intr_wrapper(int32_t cpu_no, uint32_t intr_source, uint32_t intr_num, int32_t intr_prio)
|
||||
{
|
||||
esp_rom_route_intr_matrix(cpu_no, intr_source, intr_num);
|
||||
esprv_int_set_priority(intr_num, intr_prio);
|
||||
esprv_int_set_type(intr_num, INTR_TYPE_LEVEL);
|
||||
}
|
||||
|
||||
static void clear_intr_wrapper(uint32_t intr_source, uint32_t intr_num)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static void set_isr_wrapper(int32_t n, void *f, void *arg)
|
||||
{
|
||||
intr_handler_set(n, (intr_handler_t)f, arg);
|
||||
}
|
||||
|
||||
static void enable_intr_wrapper(uint32_t intr_mask)
|
||||
{
|
||||
esprv_int_enable(intr_mask);
|
||||
}
|
||||
|
||||
static void disable_intr_wrapper(uint32_t intr_mask)
|
||||
{
|
||||
esprv_int_disable(intr_mask);
|
||||
}
|
||||
|
||||
static bool IRAM_ATTR is_from_isr_wrapper(void)
|
||||
{
|
||||
return !xPortCanYield();
|
||||
}
|
||||
|
||||
static void wifi_thread_semphr_free(void *data)
|
||||
{
|
||||
SemaphoreHandle_t *sem = (SemaphoreHandle_t *)(data);
|
||||
|
||||
if (sem) {
|
||||
vSemaphoreDelete(sem);
|
||||
}
|
||||
}
|
||||
|
||||
static void *wifi_thread_semphr_get_wrapper(void)
|
||||
{
|
||||
static bool s_wifi_thread_sem_key_init = false;
|
||||
static pthread_key_t s_wifi_thread_sem_key;
|
||||
SemaphoreHandle_t sem = NULL;
|
||||
|
||||
if (s_wifi_thread_sem_key_init == false) {
|
||||
if (0 != pthread_key_create(&s_wifi_thread_sem_key, wifi_thread_semphr_free)) {
|
||||
return NULL;
|
||||
}
|
||||
s_wifi_thread_sem_key_init = true;
|
||||
}
|
||||
|
||||
sem = pthread_getspecific(s_wifi_thread_sem_key);
|
||||
if (!sem) {
|
||||
sem = xSemaphoreCreateCounting(1, 0);
|
||||
if (sem) {
|
||||
pthread_setspecific(s_wifi_thread_sem_key, sem);
|
||||
ESP_LOGV(TAG, "thread sem create: sem=%p", sem);
|
||||
}
|
||||
}
|
||||
|
||||
ESP_LOGV(TAG, "thread sem get: sem=%p", sem);
|
||||
return (void *)sem;
|
||||
}
|
||||
|
||||
static void *recursive_mutex_create_wrapper(void)
|
||||
{
|
||||
return (void *)xSemaphoreCreateRecursiveMutex();
|
||||
}
|
||||
|
||||
static void *mutex_create_wrapper(void)
|
||||
{
|
||||
return (void *)xSemaphoreCreateMutex();
|
||||
}
|
||||
|
||||
static void mutex_delete_wrapper(void *mutex)
|
||||
{
|
||||
vSemaphoreDelete(mutex);
|
||||
}
|
||||
|
||||
static int32_t IRAM_ATTR mutex_lock_wrapper(void *mutex)
|
||||
{
|
||||
return (int32_t)xSemaphoreTakeRecursive(mutex, portMAX_DELAY);
|
||||
}
|
||||
|
||||
static int32_t IRAM_ATTR mutex_unlock_wrapper(void *mutex)
|
||||
{
|
||||
return (int32_t)xSemaphoreGiveRecursive(mutex);
|
||||
}
|
||||
|
||||
static void *queue_create_wrapper(uint32_t queue_len, uint32_t item_size)
|
||||
{
|
||||
#if CONFIG_SPIRAM_USE_MALLOC
|
||||
/* Use xQueueCreateWithCaps() to allocate from SPIRAM */
|
||||
return (void *)xQueueCreateWithCaps(queue_len, item_size, MALLOC_CAP_SPIRAM);
|
||||
#else
|
||||
return (void *)xQueueCreate(queue_len, item_size);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void queue_delete_wrapper(void *queue)
|
||||
{
|
||||
if (queue) {
|
||||
#if CONFIG_SPIRAM_USE_MALLOC
|
||||
vQueueDeleteWithCaps(queue);
|
||||
#else
|
||||
vQueueDelete(queue);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
static int32_t queue_send_wrapper(void *queue, void *item, uint32_t block_time_tick)
|
||||
{
|
||||
if (block_time_tick == OSI_FUNCS_TIME_BLOCKING) {
|
||||
return (int32_t)xQueueSend(queue, item, portMAX_DELAY);
|
||||
} else {
|
||||
return (int32_t)xQueueSend(queue, item, block_time_tick);
|
||||
}
|
||||
}
|
||||
|
||||
static int32_t IRAM_ATTR queue_send_from_isr_wrapper(void *queue, void *item, void *hptw)
|
||||
{
|
||||
return (int32_t)xQueueSendFromISR(queue, item, hptw);
|
||||
}
|
||||
|
||||
static int32_t queue_send_to_back_wrapper(void *queue, void *item, uint32_t block_time_tick)
|
||||
{
|
||||
return (int32_t)xQueueGenericSend(queue, item, block_time_tick, queueSEND_TO_BACK);
|
||||
}
|
||||
|
||||
static int32_t queue_send_to_front_wrapper(void *queue, void *item, uint32_t block_time_tick)
|
||||
{
|
||||
return (int32_t)xQueueGenericSend(queue, item, block_time_tick, queueSEND_TO_FRONT);
|
||||
}
|
||||
|
||||
static int32_t queue_recv_wrapper(void *queue, void *item, uint32_t block_time_tick)
|
||||
{
|
||||
if (block_time_tick == OSI_FUNCS_TIME_BLOCKING) {
|
||||
return (int32_t)xQueueReceive(queue, item, portMAX_DELAY);
|
||||
} else {
|
||||
return (int32_t)xQueueReceive(queue, item, block_time_tick);
|
||||
}
|
||||
}
|
||||
|
||||
static uint32_t event_group_wait_bits_wrapper(void *event, uint32_t bits_to_wait_for, int clear_on_exit, int wait_for_all_bits, uint32_t block_time_tick)
|
||||
{
|
||||
if (block_time_tick == OSI_FUNCS_TIME_BLOCKING) {
|
||||
return (uint32_t)xEventGroupWaitBits(event, bits_to_wait_for, clear_on_exit, wait_for_all_bits, portMAX_DELAY);
|
||||
} else {
|
||||
return (uint32_t)xEventGroupWaitBits(event, bits_to_wait_for, clear_on_exit, wait_for_all_bits, block_time_tick);
|
||||
}
|
||||
}
|
||||
|
||||
static int32_t task_create_pinned_to_core_wrapper(void *task_func, const char *name, uint32_t stack_depth, void *param, uint32_t prio, void *task_handle, uint32_t core_id)
|
||||
{
|
||||
return (uint32_t)xTaskCreatePinnedToCore(task_func, name, stack_depth, param, prio, task_handle, (core_id < portNUM_PROCESSORS ? core_id : tskNO_AFFINITY));
|
||||
}
|
||||
|
||||
static int32_t task_create_wrapper(void *task_func, const char *name, uint32_t stack_depth, void *param, uint32_t prio, void *task_handle)
|
||||
{
|
||||
return (uint32_t)xTaskCreate(task_func, name, stack_depth, param, prio, task_handle);
|
||||
}
|
||||
|
||||
static int32_t IRAM_ATTR task_ms_to_tick_wrapper(uint32_t ms)
|
||||
{
|
||||
return (int32_t)(ms / portTICK_PERIOD_MS);
|
||||
}
|
||||
|
||||
static int32_t task_get_max_priority_wrapper(void)
|
||||
{
|
||||
return (int32_t)(configMAX_PRIORITIES);
|
||||
}
|
||||
|
||||
static int32_t esp_event_post_wrapper(const char *event_base, int32_t event_id, void *event_data, size_t event_data_size, uint32_t ticks_to_wait)
|
||||
{
|
||||
if (ticks_to_wait == OSI_FUNCS_TIME_BLOCKING) {
|
||||
return (int32_t)esp_event_post(event_base, event_id, event_data, event_data_size, portMAX_DELAY);
|
||||
} else {
|
||||
return (int32_t)esp_event_post(event_base, event_id, event_data, event_data_size, ticks_to_wait);
|
||||
}
|
||||
}
|
||||
|
||||
static void IRAM_ATTR wifi_apb80m_request_wrapper(void)
|
||||
{
|
||||
#ifdef CONFIG_PM_ENABLE
|
||||
wifi_apb80m_request();
|
||||
#endif
|
||||
}
|
||||
|
||||
static void IRAM_ATTR wifi_apb80m_release_wrapper(void)
|
||||
{
|
||||
#ifdef CONFIG_PM_ENABLE
|
||||
wifi_apb80m_release();
|
||||
#endif
|
||||
}
|
||||
|
||||
static void IRAM_ATTR timer_arm_wrapper(void *timer, uint32_t tmout, bool repeat)
|
||||
{
|
||||
ets_timer_arm(timer, tmout, repeat);
|
||||
}
|
||||
|
||||
static void wifi_reset_mac_wrapper(void)
|
||||
{
|
||||
modem_clock_module_mac_reset(PERIPH_WIFI_MODULE);
|
||||
}
|
||||
|
||||
static void wifi_clock_enable_wrapper(void)
|
||||
{
|
||||
wifi_module_enable();
|
||||
}
|
||||
|
||||
static void wifi_clock_disable_wrapper(void)
|
||||
{
|
||||
wifi_module_disable();
|
||||
}
|
||||
|
||||
static int get_time_wrapper(void *t)
|
||||
{
|
||||
return os_get_time(t);
|
||||
}
|
||||
|
||||
static void *IRAM_ATTR realloc_internal_wrapper(void *ptr, size_t size)
|
||||
{
|
||||
return heap_caps_realloc(ptr, size, MALLOC_CAP_8BIT | MALLOC_CAP_DMA | MALLOC_CAP_INTERNAL);
|
||||
}
|
||||
|
||||
static void *IRAM_ATTR calloc_internal_wrapper(size_t n, size_t size)
|
||||
{
|
||||
return heap_caps_calloc(n, size, MALLOC_CAP_8BIT | MALLOC_CAP_DMA | MALLOC_CAP_INTERNAL);
|
||||
}
|
||||
|
||||
static void *IRAM_ATTR zalloc_internal_wrapper(size_t size)
|
||||
{
|
||||
void *ptr = heap_caps_calloc(1, size, MALLOC_CAP_8BIT | MALLOC_CAP_DMA | MALLOC_CAP_INTERNAL);
|
||||
return ptr;
|
||||
}
|
||||
|
||||
static esp_err_t nvs_open_wrapper(const char *name, unsigned int open_mode, nvs_handle_t *out_handle)
|
||||
{
|
||||
return nvs_open(name, (nvs_open_mode_t)open_mode, out_handle);
|
||||
}
|
||||
|
||||
static void esp_log_writev_wrapper(unsigned int level, const char *tag, const char *format, va_list args)
|
||||
{
|
||||
return esp_log_writev((esp_log_level_t)level, tag, format, args);
|
||||
}
|
||||
|
||||
static void esp_log_write_wrapper(unsigned int level, const char *tag, const char *format, ...)
|
||||
{
|
||||
va_list list;
|
||||
va_start(list, format);
|
||||
esp_log_writev((esp_log_level_t)level, tag, format, list);
|
||||
va_end(list);
|
||||
}
|
||||
|
||||
static esp_err_t esp_read_mac_wrapper(uint8_t *mac, unsigned int type)
|
||||
{
|
||||
return esp_read_mac(mac, (esp_mac_type_t)type);
|
||||
}
|
||||
|
||||
static int coex_init_wrapper(void)
|
||||
{
|
||||
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
|
||||
return coex_init();
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void coex_deinit_wrapper(void)
|
||||
{
|
||||
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
|
||||
coex_deinit();
|
||||
#endif
|
||||
}
|
||||
|
||||
static int coex_enable_wrapper(void)
|
||||
{
|
||||
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
|
||||
return coex_enable();
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void coex_disable_wrapper(void)
|
||||
{
|
||||
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
|
||||
coex_disable();
|
||||
#endif
|
||||
}
|
||||
|
||||
static IRAM_ATTR uint32_t coex_status_get_wrapper(void)
|
||||
{
|
||||
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
|
||||
return coex_status_get();
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static int coex_wifi_request_wrapper(uint32_t event, uint32_t latency, uint32_t duration)
|
||||
{
|
||||
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
|
||||
return coex_wifi_request(event, latency, duration);
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static IRAM_ATTR int coex_wifi_release_wrapper(uint32_t event)
|
||||
{
|
||||
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
|
||||
return coex_wifi_release(event);
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static int coex_wifi_channel_set_wrapper(uint8_t primary, uint8_t secondary)
|
||||
{
|
||||
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
|
||||
return coex_wifi_channel_set(primary, secondary);
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static IRAM_ATTR int coex_event_duration_get_wrapper(uint32_t event, uint32_t *duration)
|
||||
{
|
||||
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
|
||||
return coex_event_duration_get(event, duration);
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static int coex_pti_get_wrapper(uint32_t event, uint8_t *pti)
|
||||
{
|
||||
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
|
||||
return coex_pti_get(event, pti);
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void coex_schm_status_bit_clear_wrapper(uint32_t type, uint32_t status)
|
||||
{
|
||||
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
|
||||
coex_schm_status_bit_clear(type, status);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void coex_schm_status_bit_set_wrapper(uint32_t type, uint32_t status)
|
||||
{
|
||||
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
|
||||
coex_schm_status_bit_set(type, status);
|
||||
#endif
|
||||
}
|
||||
|
||||
static IRAM_ATTR int coex_schm_interval_set_wrapper(uint32_t interval)
|
||||
{
|
||||
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
|
||||
return coex_schm_interval_set(interval);
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static uint32_t coex_schm_interval_get_wrapper(void)
|
||||
{
|
||||
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
|
||||
return coex_schm_interval_get();
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static uint8_t coex_schm_curr_period_get_wrapper(void)
|
||||
{
|
||||
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
|
||||
return coex_schm_curr_period_get();
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void *coex_schm_curr_phase_get_wrapper(void)
|
||||
{
|
||||
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
|
||||
return coex_schm_curr_phase_get();
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
static int coex_register_start_cb_wrapper(int (* cb)(void))
|
||||
{
|
||||
#if CONFIG_SW_COEXIST_ENABLE
|
||||
return coex_register_start_cb(cb);
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static int coex_schm_process_restart_wrapper(void)
|
||||
{
|
||||
#if CONFIG_SW_COEXIST_ENABLE
|
||||
return coex_schm_process_restart();
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static int coex_schm_register_cb_wrapper(int type, int(*cb)(int))
|
||||
{
|
||||
#if CONFIG_SW_COEXIST_ENABLE
|
||||
return coex_schm_register_callback(type, cb);
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static int coex_schm_flexible_period_set_wrapper(uint8_t period)
|
||||
{
|
||||
#if CONFIG_ESP_COEX_POWER_MANAGEMENT
|
||||
return coex_schm_flexible_period_set(period);
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static uint8_t coex_schm_flexible_period_get_wrapper(void)
|
||||
{
|
||||
#if CONFIG_ESP_COEX_POWER_MANAGEMENT
|
||||
return coex_schm_flexible_period_get();
|
||||
#else
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void IRAM_ATTR esp_empty_wrapper(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
extern void set_bb_wdg(bool busy_chk, bool srch_chk, uint16_t max_busy, uint16_t max_srch, bool rst_en, bool int_en, bool clr);
|
||||
|
||||
static void esp_phy_enable_wrapper(void)
|
||||
{
|
||||
esp_phy_enable(PHY_MODEM_WIFI);
|
||||
phy_wifi_enable_set(1);
|
||||
//disable bb idle check(max: 139ms) for temporary to avoid unexpected RXTXPANIC
|
||||
//TODO
|
||||
set_bb_wdg(true, false, 0x18, 0xaa, false, false, false);
|
||||
}
|
||||
|
||||
static void esp_phy_disable_wrapper(void)
|
||||
{
|
||||
phy_wifi_enable_set(0);
|
||||
esp_phy_disable(PHY_MODEM_WIFI);
|
||||
}
|
||||
|
||||
wifi_osi_funcs_t g_wifi_osi_funcs = {
|
||||
._version = ESP_WIFI_OS_ADAPTER_VERSION,
|
||||
._env_is_chip = esp_coex_common_env_is_chip_wrapper,
|
||||
._set_intr = set_intr_wrapper,
|
||||
._clear_intr = clear_intr_wrapper,
|
||||
._set_isr = set_isr_wrapper,
|
||||
._ints_on = enable_intr_wrapper,
|
||||
._ints_off = disable_intr_wrapper,
|
||||
._is_from_isr = is_from_isr_wrapper,
|
||||
._spin_lock_create = esp_coex_common_spin_lock_create_wrapper,
|
||||
._spin_lock_delete = free,
|
||||
._wifi_int_disable = esp_coex_common_int_disable_wrapper,
|
||||
._wifi_int_restore = esp_coex_common_int_restore_wrapper,
|
||||
._task_yield_from_isr = esp_coex_common_task_yield_from_isr_wrapper,
|
||||
._semphr_create = esp_coex_common_semphr_create_wrapper,
|
||||
._semphr_delete = esp_coex_common_semphr_delete_wrapper,
|
||||
._semphr_take = esp_coex_common_semphr_take_wrapper,
|
||||
._semphr_give = esp_coex_common_semphr_give_wrapper,
|
||||
._wifi_thread_semphr_get = wifi_thread_semphr_get_wrapper,
|
||||
._mutex_create = mutex_create_wrapper,
|
||||
._recursive_mutex_create = recursive_mutex_create_wrapper,
|
||||
._mutex_delete = mutex_delete_wrapper,
|
||||
._mutex_lock = mutex_lock_wrapper,
|
||||
._mutex_unlock = mutex_unlock_wrapper,
|
||||
._queue_create = queue_create_wrapper,
|
||||
._queue_delete = queue_delete_wrapper,
|
||||
._queue_send = queue_send_wrapper,
|
||||
._queue_send_from_isr = queue_send_from_isr_wrapper,
|
||||
._queue_send_to_back = queue_send_to_back_wrapper,
|
||||
._queue_send_to_front = queue_send_to_front_wrapper,
|
||||
._queue_recv = queue_recv_wrapper,
|
||||
._queue_msg_waiting = (uint32_t(*)(void *))uxQueueMessagesWaiting,
|
||||
._event_group_create = (void *(*)(void))xEventGroupCreate,
|
||||
._event_group_delete = (void(*)(void *))vEventGroupDelete,
|
||||
._event_group_set_bits = (uint32_t(*)(void *, uint32_t))xEventGroupSetBits,
|
||||
._event_group_clear_bits = (uint32_t(*)(void *, uint32_t))xEventGroupClearBits,
|
||||
._event_group_wait_bits = event_group_wait_bits_wrapper,
|
||||
._task_create_pinned_to_core = task_create_pinned_to_core_wrapper,
|
||||
._task_create = task_create_wrapper,
|
||||
._task_delete = (void(*)(void *))vTaskDelete,
|
||||
._task_delay = vTaskDelay,
|
||||
._task_ms_to_tick = task_ms_to_tick_wrapper,
|
||||
._task_get_current_task = (void *(*)(void))xTaskGetCurrentTaskHandle,
|
||||
._task_get_max_priority = task_get_max_priority_wrapper,
|
||||
._malloc = malloc,
|
||||
._free = free,
|
||||
._event_post = esp_event_post_wrapper,
|
||||
._get_free_heap_size = esp_get_free_internal_heap_size,
|
||||
._rand = esp_random,
|
||||
._dport_access_stall_other_cpu_start_wrap = esp_empty_wrapper,
|
||||
._dport_access_stall_other_cpu_end_wrap = esp_empty_wrapper,
|
||||
._wifi_apb80m_request = wifi_apb80m_request_wrapper,
|
||||
._wifi_apb80m_release = wifi_apb80m_release_wrapper,
|
||||
._phy_disable = esp_phy_disable_wrapper,
|
||||
._phy_enable = esp_phy_enable_wrapper,
|
||||
._phy_update_country_info = esp_phy_update_country_info,
|
||||
._read_mac = esp_read_mac_wrapper,
|
||||
._timer_arm = timer_arm_wrapper,
|
||||
._timer_disarm = esp_coex_common_timer_disarm_wrapper,
|
||||
._timer_done = esp_coex_common_timer_done_wrapper,
|
||||
._timer_setfn = esp_coex_common_timer_setfn_wrapper,
|
||||
._timer_arm_us = esp_coex_common_timer_arm_us_wrapper,
|
||||
._wifi_reset_mac = wifi_reset_mac_wrapper,
|
||||
._wifi_clock_enable = wifi_clock_enable_wrapper,
|
||||
._wifi_clock_disable = wifi_clock_disable_wrapper,
|
||||
._wifi_rtc_enable_iso = esp_empty_wrapper,
|
||||
._wifi_rtc_disable_iso = esp_empty_wrapper,
|
||||
._esp_timer_get_time = esp_timer_get_time,
|
||||
._nvs_set_i8 = nvs_set_i8,
|
||||
._nvs_get_i8 = nvs_get_i8,
|
||||
._nvs_set_u8 = nvs_set_u8,
|
||||
._nvs_get_u8 = nvs_get_u8,
|
||||
._nvs_set_u16 = nvs_set_u16,
|
||||
._nvs_get_u16 = nvs_get_u16,
|
||||
._nvs_open = nvs_open_wrapper,
|
||||
._nvs_close = nvs_close,
|
||||
._nvs_commit = nvs_commit,
|
||||
._nvs_set_blob = nvs_set_blob,
|
||||
._nvs_get_blob = nvs_get_blob,
|
||||
._nvs_erase_key = nvs_erase_key,
|
||||
._get_random = os_get_random,
|
||||
._get_time = get_time_wrapper,
|
||||
._random = os_random,
|
||||
._slowclk_cal_get = esp_coex_common_clk_slowclk_cal_get_wrapper,
|
||||
._log_write = esp_log_write_wrapper,
|
||||
._log_writev = esp_log_writev_wrapper,
|
||||
._log_timestamp = esp_log_timestamp,
|
||||
._malloc_internal = esp_coex_common_malloc_internal_wrapper,
|
||||
._realloc_internal = realloc_internal_wrapper,
|
||||
._calloc_internal = calloc_internal_wrapper,
|
||||
._zalloc_internal = zalloc_internal_wrapper,
|
||||
._wifi_malloc = wifi_malloc,
|
||||
._wifi_realloc = wifi_realloc,
|
||||
._wifi_calloc = wifi_calloc,
|
||||
._wifi_zalloc = wifi_zalloc_wrapper,
|
||||
._wifi_create_queue = wifi_create_queue_wrapper,
|
||||
._wifi_delete_queue = wifi_delete_queue_wrapper,
|
||||
._coex_init = coex_init_wrapper,
|
||||
._coex_deinit = coex_deinit_wrapper,
|
||||
._coex_enable = coex_enable_wrapper,
|
||||
._coex_disable = coex_disable_wrapper,
|
||||
._coex_status_get = coex_status_get_wrapper,
|
||||
._coex_wifi_request = coex_wifi_request_wrapper,
|
||||
._coex_wifi_release = coex_wifi_release_wrapper,
|
||||
._coex_wifi_channel_set = coex_wifi_channel_set_wrapper,
|
||||
._coex_event_duration_get = coex_event_duration_get_wrapper,
|
||||
._coex_pti_get = coex_pti_get_wrapper,
|
||||
._coex_schm_status_bit_clear = coex_schm_status_bit_clear_wrapper,
|
||||
._coex_schm_status_bit_set = coex_schm_status_bit_set_wrapper,
|
||||
._coex_schm_interval_set = coex_schm_interval_set_wrapper,
|
||||
._coex_schm_interval_get = coex_schm_interval_get_wrapper,
|
||||
._coex_schm_curr_period_get = coex_schm_curr_period_get_wrapper,
|
||||
._coex_schm_curr_phase_get = coex_schm_curr_phase_get_wrapper,
|
||||
._coex_register_start_cb = coex_register_start_cb_wrapper,
|
||||
#if SOC_PM_MODEM_RETENTION_BY_REGDMA
|
||||
._regdma_link_set_write_wait_content = regdma_link_set_write_wait_content,
|
||||
._sleep_retention_find_link_by_id = sleep_retention_find_link_by_id,
|
||||
#endif
|
||||
._coex_schm_process_restart = coex_schm_process_restart_wrapper,
|
||||
._coex_schm_register_cb = coex_schm_register_cb_wrapper,
|
||||
._coex_schm_flexible_period_set = coex_schm_flexible_period_set_wrapper,
|
||||
._coex_schm_flexible_period_get = coex_schm_flexible_period_get_wrapper,
|
||||
._magic = ESP_WIFI_OS_ADAPTER_MAGIC,
|
||||
};
|
@ -189,7 +189,7 @@ typedef struct {
|
||||
uint32_t txbf;
|
||||
uint32_t dcm;
|
||||
} nonmimo[ESP_TEST_RX_MU_USER_NUM];
|
||||
#if CONFIG_IDF_TARGET_ESP32C5
|
||||
#if CONFIG_IDF_TARGET_ESP32C5 || CONFIG_IDF_TARGET_ESP32C61
|
||||
uint32_t mu_bru_id_0: 16;
|
||||
uint32_t mu_bru_id_bssidx: 16;
|
||||
uint32_t mu_bru_id_2047: 16;
|
||||
@ -200,7 +200,7 @@ typedef struct {
|
||||
#endif
|
||||
} esp_test_rx_mu_statistics_t; //10932 bytes
|
||||
|
||||
#if CONFIG_IDF_TARGET_ESP32C5
|
||||
#if CONFIG_IDF_TARGET_ESP32C5 || CONFIG_IDF_TARGET_ESP32C61
|
||||
typedef struct {
|
||||
uint32_t legacy;
|
||||
uint32_t legacy_noeb;
|
||||
@ -406,7 +406,7 @@ typedef struct {
|
||||
uint16_t rxhung_statis;
|
||||
uint16_t txhung_statis;
|
||||
uint32_t rxtxhung;
|
||||
#if CONFIG_IDF_TARGET_ESP32C5
|
||||
#if CONFIG_IDF_TARGET_ESP32C5 || CONFIG_IDF_TARGET_ESP32C61
|
||||
uint32_t rxtxpanic;
|
||||
uint8_t bf_ndp_timeout;
|
||||
uint8_t bf_report_err;
|
||||
|
@ -149,7 +149,7 @@ typedef struct wifi_osi_funcs_t {
|
||||
int (* _coex_schm_process_restart)(void);
|
||||
int (* _coex_schm_register_cb)(int, int (* cb)(int));
|
||||
int (* _coex_register_start_cb)(int (* cb)(void));
|
||||
#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32C5
|
||||
#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32C5 || CONFIG_IDF_TARGET_ESP32C61
|
||||
void (* _regdma_link_set_write_wait_content)(void *, uint32_t, uint32_t);
|
||||
void * (* _sleep_retention_find_link_by_id)(int);
|
||||
#endif
|
||||
|
@ -41,7 +41,7 @@ enum {
|
||||
/**
|
||||
* @brief Channel state information(CSI) configuration type
|
||||
*/
|
||||
#if CONFIG_IDF_TARGET_ESP32C5
|
||||
#if CONFIG_IDF_TARGET_ESP32C5 || CONFIG_IDF_TARGET_ESP32C61
|
||||
typedef struct {
|
||||
uint32_t enable : 1; /**< enable to acquire CSI */
|
||||
uint32_t acquire_csi_legacy : 1; /**< enable to acquire L-LTF */
|
||||
@ -172,7 +172,7 @@ typedef enum {
|
||||
/**
|
||||
* @brief RxControl Info
|
||||
*/
|
||||
#if CONFIG_IDF_TARGET_ESP32C5
|
||||
#if CONFIG_IDF_TARGET_ESP32C5 || CONFIG_IDF_TARGET_ESP32C61
|
||||
typedef struct {
|
||||
signed rssi: 8; /**< the RSSI of the reception frame */
|
||||
unsigned rate: 5; /**< if cur_bb_format is RX_BB_FORMAT_11B, it's the transmission rate. otherwise it's Rate field of L-SIG */
|
||||
|
@ -18,8 +18,8 @@ extern "C" {
|
||||
|
||||
#if CONFIG_IDF_TARGET_ESP32C2
|
||||
#define ESP_WIFI_MAX_CONN_NUM (4) /**< max number of stations which can connect to ESP32C2 soft-AP */
|
||||
#elif CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32C5
|
||||
#define ESP_WIFI_MAX_CONN_NUM (10) /**< max number of stations which can connect to ESP32C3 soft-AP */
|
||||
#elif CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32C5 || CONFIG_IDF_TARGET_ESP32C61
|
||||
#define ESP_WIFI_MAX_CONN_NUM (10) /**< max number of stations which can connect to ESP32C3/ESP32C6/ESP32C5/ESP32C61 soft-AP */
|
||||
#else
|
||||
#define ESP_WIFI_MAX_CONN_NUM (15) /**< max number of stations which can connect to ESP32/ESP32S3/ESP32S2 soft-AP */
|
||||
#endif
|
||||
|
Submodule components/esp_wifi/lib updated: f28ad22ab8...e66a47c0ba
@ -10,3 +10,6 @@ components/esp_wifi/test_apps/wifi_connect:
|
||||
components/esp_wifi/test_apps/wifi_function:
|
||||
disable:
|
||||
- if: SOC_WIFI_SUPPORTED != 1
|
||||
disable_test:
|
||||
- if: IDF_TARGET == "esp32c61"
|
||||
reason: lack of runner
|
||||
|
@ -1,2 +1,2 @@
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- |
|
||||
|
@ -1,3 +1,3 @@
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- |
|
||||
|
||||
|
@ -31,6 +31,14 @@ config SOC_ASYNC_MEMCPY_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_PHY_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_WIFI_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_SUPPORTS_SECURE_DL_MODE
|
||||
bool
|
||||
default y
|
||||
@ -791,6 +799,34 @@ config SOC_RCC_IS_INDEPENDENT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_WIFI_HW_TSF
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_WIFI_FTM_SUPPORT
|
||||
bool
|
||||
default n
|
||||
|
||||
config SOC_WIFI_GCMP_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_WIFI_WAPI_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_WIFI_CSI_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_WIFI_MESH_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_WIFI_HE_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_PHY_COMBO_MODULE
|
||||
bool
|
||||
default y
|
||||
|
@ -28,7 +28,8 @@
|
||||
#define SOC_USB_SERIAL_JTAG_SUPPORTED 1
|
||||
#define SOC_ASYNC_MEMCPY_SUPPORTED 1
|
||||
// \#define SOC_TEMP_SENSOR_SUPPORTED 1 //TODO: [ESP32C61] IDF-9322
|
||||
// \#define SOC_WIFI_SUPPORTED 1
|
||||
#define SOC_PHY_SUPPORTED 1
|
||||
#define SOC_WIFI_SUPPORTED 1
|
||||
#define SOC_SUPPORTS_SECURE_DL_MODE 1
|
||||
#define SOC_EFUSE_KEY_PURPOSE_FIELD 1
|
||||
#define SOC_EFUSE_SUPPORTED 1
|
||||
@ -447,13 +448,13 @@
|
||||
// #define SOC_TEMPERATURE_SENSOR_INTR_SUPPORT (1)
|
||||
|
||||
/*------------------------------------ WI-FI CAPS ------------------------------------*/
|
||||
// #define SOC_WIFI_HW_TSF (1) /*!< Support hardware TSF */
|
||||
// #define SOC_WIFI_FTM_SUPPORT (0) /*!< Support FTM */
|
||||
// #define SOC_WIFI_GCMP_SUPPORT (1) /*!< Support GCMP(GCMP128 and GCMP256) */
|
||||
// #define SOC_WIFI_WAPI_SUPPORT (1) /*!< Support WAPI */
|
||||
// #define SOC_WIFI_CSI_SUPPORT (1) /*!< Support CSI */
|
||||
// #define SOC_WIFI_MESH_SUPPORT (1) /*!< Support WIFI MESH */
|
||||
// #define SOC_WIFI_HE_SUPPORT (1) /*!< Support Wi-Fi 6 */
|
||||
#define SOC_WIFI_HW_TSF (1) /*!< Support hardware TSF */
|
||||
#define SOC_WIFI_FTM_SUPPORT (0) /*!< Support FTM */
|
||||
#define SOC_WIFI_GCMP_SUPPORT (1) /*!< Support GCMP(GCMP128 and GCMP256) */
|
||||
#define SOC_WIFI_WAPI_SUPPORT (1) /*!< Support WAPI */
|
||||
#define SOC_WIFI_CSI_SUPPORT (1) /*!< Support CSI */
|
||||
#define SOC_WIFI_MESH_SUPPORT (1) /*!< Support WIFI MESH */
|
||||
#define SOC_WIFI_HE_SUPPORT (1) /*!< Support Wi-Fi 6 */
|
||||
|
||||
/*---------------------------------- Bluetooth CAPS ----------------------------------*/
|
||||
// \#define SOC_BLE_SUPPORTED (1) /*!< Support Bluetooth Low Energy hardware */
|
||||
|
@ -78,6 +78,8 @@
|
||||
#include "esp32h2/rom/ets_sys.h"
|
||||
#elif CONFIG_IDF_TARGET_ESP32P4
|
||||
#include "esp32p4/rom/ets_sys.h"
|
||||
#elif CONFIG_IDF_TARGET_ESP32C61
|
||||
#include "esp32c61/rom/ets_sys.h"
|
||||
#endif
|
||||
|
||||
#endif /* !__ets__ */
|
||||
|
@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- |
|
||||
|
||||
# wpa_supplicant unit test
|
||||
|
||||
|
@ -230,7 +230,7 @@ ESP32C2_DOCS = ['api-guides/RF_calibration.rst',
|
||||
|
||||
ESP32C5_DOCS = ['api-guides/phy.rst']
|
||||
|
||||
ESP32C61_DOCS = ['']
|
||||
ESP32C61_DOCS = ['api-guides/phy.rst']
|
||||
|
||||
ESP32C6_DOCS = ['api-guides/RF_calibration.rst',
|
||||
'api-reference/peripherals/sd_pullup_requirements.rst',
|
||||
@ -305,6 +305,7 @@ conditional_include_dict = {'SOC_BT_SUPPORTED':BT_DOCS,
|
||||
'esp32c3':ESP32C3_DOCS,
|
||||
'esp32c5':ESP32C5_DOCS,
|
||||
'esp32c6':ESP32C6_DOCS,
|
||||
'esp32c61':ESP32C61_DOCS,
|
||||
'esp32h2':ESP32H2_DOCS,
|
||||
'esp32p4':ESP32P4_DOCS}
|
||||
|
||||
|
@ -5,18 +5,18 @@ Introduction to Low Power Mode in Wi-Fi Scenarios
|
||||
|
||||
After the previous introduction to low power mode from a systemic perspective, this section delves into low power mode in Wi-Fi scenarios. Due to the complexity of Wi-Fi scenarios, basic principles of Wi-Fi power saving will be introduced before specific low power mode. This section is focused on station mode.
|
||||
|
||||
Choosing Low Power Mode in Wi-Fi Scenarios
|
||||
---------------------------------------------
|
||||
.. todo - add sleep-current/esp32c5_summary.inc and sleep-current/esp32c61_summary.inc
|
||||
|
||||
To help users select appropriate low power mode, a summary table of low power modes in Wi-Fi scenarios is provided before detailed introduction.
|
||||
.. only:: not esp32c5 and not esp32c61
|
||||
|
||||
.. todo - add sleep-current/esp32c5_summary.inc
|
||||
Choosing Low Power Mode in Wi-Fi Scenarios
|
||||
---------------------------------------------
|
||||
|
||||
.. only:: not esp32c5
|
||||
To help users select appropriate low power mode, a summary table of low power modes in Wi-Fi scenarios is provided before detailed introduction.
|
||||
|
||||
.. include:: ../sleep-current/{IDF_TARGET_PATH_NAME}_summary.inc
|
||||
.. include:: ../sleep-current/{IDF_TARGET_PATH_NAME}_summary.inc
|
||||
|
||||
.. note::
|
||||
.. note::
|
||||
|
||||
All currents in the table are average currents, and the terms in the table are explained in the following text. Users can refer to them as needed.
|
||||
|
||||
@ -363,13 +363,13 @@ Modem-sleep Mode Configuration
|
||||
* - ``light_sleep_enable``
|
||||
- false
|
||||
|
||||
- Configuration Performance
|
||||
.. todo - add sleep-current/esp32c5_modem_sleep.inc sleep-current/esp32c61_modem_sleep.inc
|
||||
|
||||
.. todo - add sleep-current/esp32c5_modem_sleep.inc
|
||||
.. only:: not esp32c5 and not esp32c61
|
||||
|
||||
.. only:: not esp32c5
|
||||
- Configuration Performance
|
||||
|
||||
.. include:: ../sleep-current/{IDF_TARGET_PATH_NAME}_modem_sleep.inc
|
||||
.. include:: ../sleep-current/{IDF_TARGET_PATH_NAME}_modem_sleep.inc
|
||||
|
||||
|
||||
Auto Light-sleep Mode + Wi-Fi Scenario Configuration
|
||||
@ -377,15 +377,15 @@ Auto Light-sleep Mode + Wi-Fi Scenario Configuration
|
||||
|
||||
Auto Light-sleep mode in Wi-Fi scenarios does not require wake-up source configuration compared with a pure system. But the remaining part of configuration is basically the same in the two operation scenarios. Therefore, detailed introduction of configurable options, configuration steps, and recommended configurations can be found in the previous section :ref:`Deep-sleep Mode`, with the Wi-Fi-related configurations set to default.
|
||||
|
||||
- Configuration Performance
|
||||
.. todo - add sleep-current/esp32c5_light_sleep.inc and leep-current/esp32c61_light_sleep.inc
|
||||
|
||||
The configuration performance mirrors that of the recommended Auto Light-sleep mode configuration in a pure system, combined with the default Wi-Fi-related configurations in the Wi-Fi environment.
|
||||
.. only:: not esp32c5 and not esp32c61
|
||||
|
||||
.. todo - add sleep-current/esp32c5_light_sleep.inc
|
||||
- Configuration Performance
|
||||
|
||||
.. only:: not esp32c5
|
||||
The configuration performance mirrors that of the recommended Auto Light-sleep mode configuration in a pure system, combined with the default Wi-Fi-related configurations in the Wi-Fi environment.
|
||||
|
||||
.. include:: ../sleep-current/{IDF_TARGET_PATH_NAME}_light_sleep.inc
|
||||
.. include:: ../sleep-current/{IDF_TARGET_PATH_NAME}_light_sleep.inc
|
||||
|
||||
Deep-sleep Mode + Wi-Fi Scenario Configuration
|
||||
++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
@ -5,18 +5,19 @@ Wi-Fi 场景下低功耗模式介绍
|
||||
|
||||
本节将结合纯系统下的功耗模式来介绍 Wi-Fi 场景下的低功耗模式。因为 Wi-Fi 场景的复杂性,本节会首先介绍 Wi-Fi 省电的基本原理,然后再介绍具体的低功耗模式。本节主要针对 station 模式。
|
||||
|
||||
Wi-Fi 场景如何选择低功耗模式
|
||||
--------------------------------------
|
||||
.. todo - add sleep-current/esp32c5_summary.inc and sleep-current/esp32c61_summary.inc
|
||||
|
||||
在介绍具体内容前先给出 Wi-Fi 场景下低功耗模式总结表,以方便用户根据需求快速选择想要了解的内容,选择合适的低功耗模式。
|
||||
.. only:: not esp32c5 and not esp32c61
|
||||
|
||||
.. todo - add sleep-current/esp32c5_summary.inc
|
||||
Wi-Fi 场景如何选择低功耗模式
|
||||
--------------------------------------
|
||||
|
||||
.. only:: not esp32c5
|
||||
在介绍具体内容前先给出 Wi-Fi 场景下低功耗模式总结表,以方便用户根据需求快速选择想要了解的内容,选择合适的低功耗模式。
|
||||
|
||||
.. include:: ../sleep-current/{IDF_TARGET_PATH_NAME}_summary.inc
|
||||
|
||||
.. note::
|
||||
.. include:: ../sleep-current/{IDF_TARGET_PATH_NAME}_summary.inc
|
||||
|
||||
.. note::
|
||||
|
||||
上表中所有电流均为平均电流,表中术语在下文均有介绍,用户可根据需求进行查看。
|
||||
|
||||
@ -363,13 +364,13 @@ Modem-sleep 模式配置
|
||||
* - ``light_sleep_enable``
|
||||
- false
|
||||
|
||||
- 配置表现
|
||||
.. todo - add sleep-current/esp32c5_modem_sleep.inc sleep-current/esp32c61_modem_sleep.inc
|
||||
|
||||
.. todo - add sleep-current/esp32c5_modem_sleep.inc
|
||||
.. only:: not esp32c5 and not esp32c61
|
||||
|
||||
.. only:: not esp32c5
|
||||
- 配置表现
|
||||
|
||||
.. include:: ../sleep-current/{IDF_TARGET_PATH_NAME}_modem_sleep.inc
|
||||
.. include:: ../sleep-current/{IDF_TARGET_PATH_NAME}_modem_sleep.inc
|
||||
|
||||
|
||||
Auto Light-sleep 模式 + Wi-Fi 场景配置
|
||||
@ -377,15 +378,15 @@ Auto Light-sleep 模式 + Wi-Fi 场景配置
|
||||
|
||||
Auto Light-sleep 在 Wi-Fi 场景下的配置比纯系统下少了唤醒源的配置要求,其余几乎与纯系统下配置一致,因此可配置选项、配置步骤、推荐配置的详细介绍可以参考上文 :ref:`Deep-sleep 模式`。同时 Wi-Fi 相关配置保持默认。
|
||||
|
||||
- 配置表现
|
||||
.. todo - add sleep-current/esp32c5_light_sleep.inc and leep-current/esp32c61_light_sleep.inc
|
||||
|
||||
该配置表现为 Auto Light-sleep 模式纯系统推荐配置 + 默认的 Wi-Fi 相关配置在 Wi-Fi 场景的表现。
|
||||
.. only:: not esp32c5 and not esp32c61
|
||||
|
||||
.. todo - add sleep-current/esp32c5_light_sleep.inc
|
||||
- 配置表现
|
||||
|
||||
.. only:: not esp32c5
|
||||
该配置表现为 Auto Light-sleep 模式纯系统推荐配置 + 默认的 Wi-Fi 相关配置在 Wi-Fi 场景的表现。
|
||||
|
||||
.. include:: ../sleep-current/{IDF_TARGET_PATH_NAME}_light_sleep.inc
|
||||
.. include:: ../sleep-current/{IDF_TARGET_PATH_NAME}_light_sleep.inc
|
||||
|
||||
Deep-sleep 模式 + Wi-Fi 场景配置
|
||||
+++++++++++++++++++++++++++++++++++
|
||||
|
@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | --------- | -------- | -------- |
|
||||
|
||||
# Mesh Internal Communication Example
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | --------- | -------- | -------- |
|
||||
|
||||
# Mesh IP Internal Networking example
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | --------- | -------- | -------- |
|
||||
|
||||
# Mesh Manual Networking Example
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- |
|
||||
|
||||
# eth2ap Example
|
||||
(See the README.md file in the upper level 'examples' directory for more information about examples. To try a more complex application about Ethernet to WiFi data forwarding, please go to [iot-solution](https://github.com/espressif/esp-iot-solution/tree/release/v1.0/examples/eth2wifi).)
|
||||
|
@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- |
|
||||
|
||||
# Simple Sniffer Example
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- |
|
||||
|
||||
# WiFi station to "Wired" interface L2 forwarder
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
examples/openthread/ot_br:
|
||||
enable:
|
||||
- if: SOC_WIFI_SUPPORTED == 1 and IDF_TARGET != "esp32c5"
|
||||
- if: SOC_WIFI_SUPPORTED == 1 and IDF_TARGET != "esp32c61"
|
||||
disable_test:
|
||||
- if: IDF_TARGET not in ["esp32s3"]
|
||||
reason: only test on esp32s3
|
||||
|
@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
|
||||
|
||||
# OpenThread Border Router Example
|
||||
|
||||
@ -52,7 +52,7 @@ Two ways are provided to setup the Thread Border Router in this example:
|
||||
|
||||
- Auto Start
|
||||
Enable `OPENTHREAD_BR_AUTO_START`, configure the `CONFIG_EXAMPLE_WIFI_SSID` and `CONFIG_EXAMPLE_WIFI_PASSWORD` with your access point's ssid and psk.
|
||||
The device will connect to Wi-Fi and form a Thread network automatically after bootup.
|
||||
The device will connect to Wi-Fi and form a Thread network automatically after boot up.
|
||||
|
||||
- Manual mode
|
||||
Disable `OPENTHREAD_BR_AUTO_START` and enable `OPENTHREAD_CLI_ESP_EXTENSION`. `wifi` command will be added for connecting the device to the Wi-Fi network.
|
||||
|
@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- |
|
||||
|
||||
# Wi-Fi Provisioning Manager Example
|
||||
|
||||
|
@ -61,6 +61,10 @@ examples/wifi/power_save:
|
||||
<<: *wifi_depends_default
|
||||
disable:
|
||||
- if: (SOC_WIFI_SUPPORTED != 1) or (IDF_TARGET == "esp32c5")
|
||||
disable_test:
|
||||
- if: IDF_TARGET == "esp32c61"
|
||||
temporary: true
|
||||
reason: lack of runners
|
||||
depends_components:
|
||||
- esp_driver_uart
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- |
|
||||
|
||||
# ESPNOW Example
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- |
|
||||
|
||||
# Wi-Fi Fast Scan Example
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- |
|
||||
|
||||
# Wi-Fi SoftAP Example
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- |
|
||||
|
||||
# Wi-Fi Station Example
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-P4 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-P4 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- | -------- |
|
||||
|
||||
# Iperf Example
|
||||
|
||||
|
42
examples/wifi/iperf/sdkconfig.defaults.esp32c61
Normal file
42
examples/wifi/iperf/sdkconfig.defaults.esp32c61
Normal file
@ -0,0 +1,42 @@
|
||||
#
|
||||
# ESP32C61-Specific
|
||||
#
|
||||
CONFIG_IDF_ENV_FPGA=n
|
||||
|
||||
CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM=15
|
||||
CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM=30
|
||||
CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM=30
|
||||
CONFIG_ESP_WIFI_AMPDU_TX_ENABLED=y
|
||||
CONFIG_ESP_WIFI_TX_BA_WIN=20
|
||||
CONFIG_ESP_WIFI_AMPDU_RX_ENABLED=y
|
||||
CONFIG_ESP_WIFI_RX_BA_WIN=14
|
||||
CONFIG_ESP_WIFI_NVS_ENABLED=n
|
||||
|
||||
CONFIG_LWIP_TCP_SND_BUF_DEFAULT=18432
|
||||
CONFIG_LWIP_TCP_WND_DEFAULT=18432
|
||||
CONFIG_LWIP_TCP_RECVMBOX_SIZE=48
|
||||
CONFIG_LWIP_UDP_RECVMBOX_SIZE=64
|
||||
CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=48
|
||||
CONFIG_LWIP_IP_REASS_MAX_PBUFS=15
|
||||
|
||||
#
|
||||
# Serial flasher config
|
||||
#
|
||||
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
|
||||
CONFIG_ESPTOOLPY_FLASHFREQ_40M=y
|
||||
|
||||
#
|
||||
# Wi-Fi
|
||||
#
|
||||
CONFIG_ESP_WIFI_ENABLE_WIFI_TX_STATS=y
|
||||
CONFIG_ESP_WIFI_ENABLE_WIFI_RX_STATS=y
|
||||
CONFIG_ESP_WIFI_ENABLE_WIFI_RX_MU_STATS=y
|
||||
CONFIG_ESP_WIFI_ENABLE_DUMP_HESIGB=n
|
||||
CONFIG_ESP_WIFI_ENABLE_DUMP_MU_CFO=n
|
||||
CONFIG_ESP_WIFI_ENABLE_DUMP_CTRL_NDPA=n
|
||||
CONFIG_ESP_WIFI_ENABLE_DUMP_CTRL_BFRP=n
|
||||
CONFIG_ESP_WIFI_SLP_IRAM_OPT=n
|
||||
CONFIG_LWIP_EXTRA_IRAM_OPTIMIZATION=n
|
||||
|
||||
CONFIG_LWIP_TCPIP_CORE_LOCKING=y
|
||||
CONFIG_LWIP_TCPIP_CORE_LOCKING_INPUT=y
|
@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32-C5 | ESP32-C6 |
|
||||
| ----------------- | -------- | -------- |
|
||||
| Supported Targets | ESP32-C5 | ESP32-C6 | ESP32-C61 |
|
||||
| ----------------- | -------- | -------- | --------- |
|
||||
|
||||
# Wifi itwt Example
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-C61 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | --------- | -------- | -------- |
|
||||
|
||||
# Wifi Power Save Example
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- |
|
||||
|
||||
# Roaming Example
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- |
|
||||
|
||||
# Wi-Fi Station Example
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- |
|
||||
|
||||
# Wi-Fi Scan Example
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- |
|
||||
|
||||
# smartconfig Example
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- |
|
||||
|
||||
# Wi-Fi SoftAP & Station Example
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- |
|
||||
|
||||
# WPA2 Enterprise Example
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- |
|
||||
|
||||
# Device Provisioning Protocol (Enrollee) Example
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- |
|
||||
|
||||
|
||||
# Understanding different WiFi enterprise modes:
|
||||
|
@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- |
|
||||
|
||||
# Wi-Fi WPS Example
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- |
|
||||
|
||||
# Wi-Fi WPS Registrar Example
|
||||
|
||||
|
@ -8,8 +8,8 @@
|
||||
|
||||
examples/zigbee/esp_zigbee_gateway:
|
||||
enable:
|
||||
- if: SOC_WIFI_SUPPORTED == 1 and IDF_TARGET not in ["esp32c2", "esp32c5"]
|
||||
reason: not supported esp32c2 and esp32c5
|
||||
- if: SOC_WIFI_SUPPORTED == 1 and IDF_TARGET not in ["esp32c2", "esp32c5", "esp32c61"]
|
||||
reason: not supported esp32c2 and esp32c5 and esp32c61
|
||||
<<: *zigbee_dependencies
|
||||
|
||||
examples/zigbee/esp_zigbee_rcp:
|
||||
|
@ -3,3 +3,6 @@
|
||||
tools/test_apps/peripherals/i2c_wifi:
|
||||
disable:
|
||||
- if: SOC_I2C_SUPPORTED != 1 or SOC_WIFI_SUPPORTED != 1
|
||||
disable_test:
|
||||
- if: IDF_TARGET == "esp32c61"
|
||||
reason: lack of runner
|
||||
|
@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- |
|
||||
|
||||
# I2C-WIFI Test
|
||||
|
||||
|
@ -4,7 +4,7 @@ tools/test_apps/phy/phy_multi_init_data_test:
|
||||
disable:
|
||||
- if: SOC_WIFI_SUPPORTED != 1
|
||||
disable_test:
|
||||
- if: IDF_TARGET in ["esp32c5"]
|
||||
- if: IDF_TARGET in ["esp32c5", "esp32c61"]
|
||||
reason: lack of runner
|
||||
|
||||
tools/test_apps/phy/phy_tsens:
|
||||
|
@ -1,2 +1,2 @@
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- |
|
||||
|
Reference in New Issue
Block a user