]> granicus.if.org Git - esp-idf/commitdiff
phy init: modify some comments
authorXiaXiaotian <xiaxiaotian@espressif.com>
Mon, 20 Feb 2017 02:23:56 +0000 (10:23 +0800)
committerXiaXiaotian <xiaxiaotian@espressif.com>
Mon, 20 Feb 2017 02:44:40 +0000 (10:44 +0800)
components/esp32/Kconfig
components/esp32/phy_init.c
components/esp32/rtc.h

index d3441fa017e45442852809d9846c57c77281e0a3..8aa0ed3b5fbbe07cd172add24aa6c48b9e0cd3c1 100644 (file)
@@ -508,13 +508,14 @@ config PHY_ENABLED
 menu PHY
        visible if PHY_ENABLED
        
-config ESP32_STORE_PHY_CAL_DATA_INTO_NVS
-    bool "Store PHY calibration data into NVS"
+config ESP32_PHY_CALIBRATION_AND_DATA_STORAGE
+    bool "Do phy calibration and store calibration data in NVS"
     depends on PHY_ENABLED
     default y
     help
-        If this option is enabled, PHY initialization will also calibrate PHY data, and
-        store it into NVS.
+        If this option is enabled, NVS will be initialized and calibration data will be loaded from there.
+        PHY calibration will be skipped on deep sleep wakeup. If calibration data is not found, full calibration
+        will be performed and stored in NVS. In all other cases, only partial calibration will be performed. 
 
         If unsure, choose 'y'.
 
index 340bd7ee72d263ebd2a60c37d4d4f06c070ba25b..8ec518bac09e5853bf9fb0aaab0bf61820638ef7 100644 (file)
@@ -77,7 +77,7 @@ esp_err_t esp_phy_rf_deinit(void)
 
     _lock_acquire(&s_phy_rf_init_lock);
     if (s_phy_rf_init_count == 1) {
-        // Disable PHY and RF. This is a teporary function.
+        // Disable PHY and RF. TODO: convert this function to another one.
         pm_close_rf();
         // Disable WiFi peripheral clock
         CLEAR_PERI_REG_MASK(DPORT_WIFI_CLK_EN_REG, 0x87cf);
@@ -257,7 +257,7 @@ static esp_err_t store_cal_data_to_nvs_handle(nvs_handle handle,
 
 void esp_phy_load_cal_and_init(void)
 {
-#ifdef CONFIG_ESP32_STORE_PHY_CAL_DATA_INTO_NVS
+#ifdef CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE
     nvs_flash_init();
     esp_phy_calibration_mode_t calibration_mode = PHY_RF_CAL_PARTIAL;
     if (rtc_get_reset_reason(0) == DEEPSLEEP_RESET) {
index 48272259fa53da4336513c7d86002bcf032d5724..f21d0da83ec9d37c90882f36975ca183c1d9a16e 100644 (file)
@@ -136,7 +136,7 @@ void rtc_slp_prep_lite(uint32_t deep_slp, uint32_t cpu_lp_mode);
 uint32_t rtc_sleep(uint32_t cycles_h, uint32_t cycles_l, uint32_t wakeup_opt, uint32_t reject_opt);
 
 /**
- * @brief Shutdown PHY and RF. This is a temporary function.
+ * @brief Shutdown PHY and RF. TODO: convert this function to another one.
  */
 void pm_close_rf(void);