Skip to content

Commit

Permalink
Document bootloader limitation
Browse files Browse the repository at this point in the history
+ typo fix
  • Loading branch information
playfulFence committed Oct 29, 2024
1 parent a50b27f commit f238b84
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 2 additions & 4 deletions esp-hal/src/rtc_cntl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -915,14 +915,12 @@ impl Rwdt {
rtc_cntl.wdtwprotect().write(|w| unsafe { w.bits(wkey) });
}

let rtc_cntl = unsafe { lpwr() };
let rtc_cntl = unsafe { lp_wdt() };
fn set_enabled(&mut self, enable: bool) {
let rtc_cntl = unsafe { lp_wdt() };

self.set_write_protection(false);

if !enabled {
if !enable {
rtc_cntl.wdtconfig0().modify(|_, w| unsafe { w.bits(0) });
} else {
rtc_cntl
Expand All @@ -931,7 +929,7 @@ impl Rwdt {

rtc_cntl
.wdtconfig0()
.modify(|_, w| w.wdt_en().bit(enabled).wdt_pause_in_slp().bit(enabled));
.modify(|_, w| w.wdt_en().bit(enable).wdt_pause_in_slp().bit(enable));

// Apply default settings for WDT
unsafe {
Expand Down
5 changes: 5 additions & 0 deletions esp-hal/src/timer/timg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1082,6 +1082,11 @@ where
}

/// Set the stage action of the MWDT for a specific stage.
///
/// This function modifies MWDT behavior only if a custom bootloader with
/// the following modifications is used:
/// - `ESP_TASK_WDT_EN` parameter **disabled**
/// - `ESP_INT_WDT` parameter **disabled**
pub fn set_stage_action(
&mut self,
stage: usize,
Expand Down

0 comments on commit f238b84

Please sign in to comment.