mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-31 19:24:33 +02:00
esp_phy: add menuconfig of phy calibration mode and disable reduce PHY TX power when brownout reset
This commit is contained in:
@@ -539,7 +539,7 @@ menu "ESP32-specific"
|
|||||||
config ESP32_REDUCE_PHY_TX_POWER
|
config ESP32_REDUCE_PHY_TX_POWER
|
||||||
bool "Reduce PHY TX power when brownout reset"
|
bool "Reduce PHY TX power when brownout reset"
|
||||||
depends on ESP32_BROWNOUT_DET
|
depends on ESP32_BROWNOUT_DET
|
||||||
default y
|
default n
|
||||||
help
|
help
|
||||||
When brownout reset occurs, reduce PHY TX power to keep the code running
|
When brownout reset occurs, reduce PHY TX power to keep the code running
|
||||||
|
|
||||||
|
@@ -473,4 +473,27 @@ menu "PHY"
|
|||||||
When using USB Serial/JTAG/OTG/CDC, PHY should enable USB, otherwise USB module
|
When using USB Serial/JTAG/OTG/CDC, PHY should enable USB, otherwise USB module
|
||||||
can not work properly. Notice: Enabling this configuration option will slightly impact wifi performance.
|
can not work properly. Notice: Enabling this configuration option will slightly impact wifi performance.
|
||||||
|
|
||||||
|
choice ESP_PHY_CALIBRATION_MODE
|
||||||
|
prompt "Calibration mode"
|
||||||
|
default ESP_PHY_RF_CAL_PARTIAL
|
||||||
|
help
|
||||||
|
Select PHY calibration mode. During RF initialization, the partial calibration
|
||||||
|
method is used by default for RF calibration. Full calibration takes about 100ms
|
||||||
|
more than partial calibration. If boot duration is not critical, it is suggested
|
||||||
|
to use the full calibration method. No calibration method is only used when the
|
||||||
|
device wakes up from deep sleep.
|
||||||
|
|
||||||
|
config ESP_PHY_RF_CAL_PARTIAL
|
||||||
|
bool "Calibration partial"
|
||||||
|
config ESP_PHY_RF_CAL_NONE
|
||||||
|
bool "Calibration none"
|
||||||
|
config ESP_PHY_RF_CAL_FULL
|
||||||
|
bool "Calibration full"
|
||||||
|
endchoice #ESP_PHY_CALIBRATION_MODE
|
||||||
|
|
||||||
|
config ESP_PHY_CALIBRATION_MODE
|
||||||
|
int
|
||||||
|
default 0 if ESP_PHY_RF_CAL_PARTIAL
|
||||||
|
default 1 if ESP_PHY_RF_CAL_NONE
|
||||||
|
default 2 if ESP_PHY_RF_CAL_FULL
|
||||||
endmenu # PHY
|
endmenu # PHY
|
||||||
|
@@ -723,7 +723,7 @@ void esp_phy_load_cal_and_init(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE
|
#ifdef CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE
|
||||||
esp_phy_calibration_mode_t calibration_mode = PHY_RF_CAL_PARTIAL;
|
esp_phy_calibration_mode_t calibration_mode = CONFIG_ESP_PHY_CALIBRATION_MODE;
|
||||||
uint8_t sta_mac[6];
|
uint8_t sta_mac[6];
|
||||||
if (rtc_get_reset_reason(0) == DEEPSLEEP_RESET) {
|
if (rtc_get_reset_reason(0) == DEEPSLEEP_RESET) {
|
||||||
calibration_mode = PHY_RF_CAL_NONE;
|
calibration_mode = PHY_RF_CAL_NONE;
|
||||||
|
Reference in New Issue
Block a user