فهرست منبع

Merge branch 'bugfix/esp_get_random_return_zero' into 'master'

Do not disable clock for generating random number.

1. Do not disable clock for generating random number.
2. And fix the bug that system crashes if call esp_wifi_stop() twice.

See merge request !534

Wu Jian Gang 9 سال پیش
والد
کامیت
8f43567a68
3فایلهای تغییر یافته به همراه6 افزوده شده و 6 حذف شده
  1. 1 1
      components/esp32/lib
  2. 4 4
      components/esp32/phy_init.c
  3. 1 1
      components/esp32/rtc.h

+ 1 - 1
components/esp32/lib

@@ -1 +1 @@
-Subproject commit 28c6ee924ca6efc71bb77dcb040efd07d4d8a000
+Subproject commit 7b06303c0fa416aea7f86b7596e84db367189066

+ 4 - 4
components/esp32/phy_init.c

@@ -82,10 +82,10 @@ 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. TODO: convert this function to another one.
-        pm_close_rf();
-        // Disable WiFi peripheral clock
-        CLEAR_PERI_REG_MASK(DPORT_WIFI_CLK_EN_REG, 0x87cf);
+        // Disable PHY and RF.
+        phy_close_rf();
+        // Disable WiFi peripheral clock. Do not disable clock for generating random number.
+        CLEAR_PERI_REG_MASK(DPORT_WIFI_CLK_EN_REG, 0x874f);
     } else {
 #if CONFIG_SW_COEXIST_ENABLE
         coex_deinit();

+ 1 - 1
components/esp32/rtc.h

@@ -138,7 +138,7 @@ uint32_t rtc_sleep(uint32_t cycles_h, uint32_t cycles_l, uint32_t wakeup_opt, ui
 /**
  * @brief Shutdown PHY and RF. TODO: convert this function to another one.
  */
-void pm_close_rf(void);
+void phy_close_rf(void);
 
 #ifdef __cplusplus
 }