Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the USB Serial JTAG watchdog workaround now that we use the stub #345

Merged
merged 1 commit into from
Jan 17, 2023
Merged
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
43 changes: 0 additions & 43 deletions espflash/src/targets/flash_target/esp32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,49 +48,6 @@ impl FlashTarget for Esp32Target {
connection.command(command)
})?;

// TODO: Remove this when we use the stub, the stub should be taking care of
// this.
// TODO: Do we also need to disable RTC super WDT?
if connection.get_usb_pid()? == USB_SERIAL_JTAG_PID {
match self.chip {
Chip::Esp32c3 => {
connection.command(Command::WriteReg {
address: 0x6000_80a8,
value: 0x50D8_3AA1,
mask: None,
})?; // WP disable
connection.command(Command::WriteReg {
address: 0x6000_8090,
value: 0x0,
mask: None,
})?; // turn off RTC WDT
connection.command(Command::WriteReg {
address: 0x6000_80a8,
value: 0x0,
mask: None,
})?; // WP enable
}
Chip::Esp32s3 => {
connection.command(Command::WriteReg {
address: 0x6000_80B0,
value: 0x50D8_3AA1,
mask: None,
})?; // WP disable
connection.command(Command::WriteReg {
address: 0x6000_8098,
value: 0x0,
mask: None,
})?; // turn off RTC WDT
connection.command(Command::WriteReg {
address: 0x6000_80B0,
value: 0x0,
mask: None,
})?; // WP enable
}
_ => {}
}
}

Ok(())
}

Expand Down