Don't disable RWDT boot protection in RAM examples

This commit is contained in:
Robert Wiewel 2022-02-28 08:47:37 +01:00
parent fd7999052c
commit dc59f7b777
4 changed files with 12 additions and 14 deletions

View File

@ -7,7 +7,6 @@ use esp32_hal::{
pac::{Peripherals, UART0},
prelude::*,
ram,
RtcCntl,
Serial,
Timer,
};
@ -30,11 +29,11 @@ fn main() -> ! {
let mut timer0 = Timer::new(peripherals.TIMG0);
let mut serial0 = Serial::new(peripherals.UART0).unwrap();
let mut rtc_cntl = RtcCntl::new(peripherals.RTC_CNTL);
// Disable MWDT and RWDT (Watchdog) flash boot protection
// Disable MWDT flash boot protection
timer0.disable();
rtc_cntl.set_wdt_global_enable(false);
// The RWDT flash boot protection remains enabled and it being triggered is part
// of the example
timer0.start(10_000_000u64);

View File

@ -29,9 +29,10 @@ fn main() -> ! {
let mut timer0 = Timer::new(peripherals.TIMG0);
let mut serial0 = Serial::new(peripherals.UART0).unwrap();
// don't disable WDTs ... we actually want it getting triggered in this example
// Disable MWDT and RWDT (Watchdog) flash boot protection
timer0.disable();
// The RWDT flash boot protection remains enabled and it being triggered is part
// of the example
timer0.start(10_000_000u64);

View File

@ -7,7 +7,6 @@ use esp32s2_hal::{
pac::{Peripherals, UART0},
prelude::*,
ram,
RtcCntl,
Serial,
Timer,
};
@ -29,12 +28,12 @@ fn main() -> ! {
let peripherals = Peripherals::take().unwrap();
let mut timer0 = Timer::new(peripherals.TIMG0);
let mut rtc_cntl = RtcCntl::new(peripherals.RTC_CNTL);
let mut serial0 = Serial::new(peripherals.UART0).unwrap();
// Disable MWDT and RWDT (Watchdog) flash boot protection
// Disable MWDT flash boot protection
timer0.disable();
rtc_cntl.set_wdt_global_enable(false);
// The RWDT flash boot protection remains enabled and it being triggered is part
// of the example
timer0.start(10_000_000u64);

View File

@ -7,7 +7,6 @@ use esp32s3_hal::{
pac::{Peripherals, UART0},
prelude::*,
ram,
RtcCntl,
Serial,
Timer,
};
@ -29,12 +28,12 @@ fn main() -> ! {
let peripherals = Peripherals::take().unwrap();
let mut timer0 = Timer::new(peripherals.TIMG0);
let mut rtc_cntl = RtcCntl::new(peripherals.RTC_CNTL);
let mut serial0 = Serial::new(peripherals.UART0).unwrap();
// Disable MWDT and RWDT (Watchdog) flash boot protection
// Disable MWDT flash boot protection
timer0.disable();
rtc_cntl.set_wdt_global_enable(false);
// The RWDT flash boot protection remains enabled and it being triggered is part
// of the example
timer0.start(10_000_000u64);