Make sure BLE and WiFi are not powered down when esp-wifi needs them (#891)
* Make sure BLE and WiFi are not powered down when esp-wifi needs them * CHANGELOG.md entry
This commit is contained in:
parent
185e5e759b
commit
8eddb9e737
@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
### Changed
|
||||
|
||||
### Fixed
|
||||
- ESP32-C3: Make sure BLE and WiFi are not powered down when esp-wifi needs them (#891)
|
||||
|
||||
### Removed
|
||||
|
||||
|
||||
@ -89,6 +89,16 @@ fn reset_mac() {
|
||||
}
|
||||
|
||||
fn init_clocks() {
|
||||
// undo the power down in base_settings (esp32c3_sleep)
|
||||
let rtc_cntl = unsafe { crate::peripherals::RTC_CNTL::steal() };
|
||||
rtc_cntl
|
||||
.dig_iso
|
||||
.modify(|_, w| w.wifi_force_iso().clear_bit().bt_force_iso().clear_bit());
|
||||
|
||||
rtc_cntl
|
||||
.dig_pwc
|
||||
.modify(|_, w| w.wifi_force_pd().clear_bit().bt_force_pd().clear_bit());
|
||||
|
||||
// from `esp_perip_clk_init`
|
||||
const SYSTEM_WIFI_CLK_I2C_CLK_EN: u32 = 1 << 5;
|
||||
const SYSTEM_WIFI_CLK_UNUSED_BIT12: u32 = 1 << 12;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user