mirror of
https://github.com/esp-rs/esp-hal.git
synced 2025-09-28 21:00:59 +00:00
Don't disable RWDT boot protection in RAM examples
This commit is contained in:
parent
fd7999052c
commit
dc59f7b777
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user