Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 10 additions & 0 deletions esp-hal-common/src/soc/esp32c3/radio_clocks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down