File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -109,6 +109,12 @@ def get_crystal_freq(self):
109109 return ESPLoader .get_crystal_freq (self )
110110
111111 def change_baud (self , baud ):
112+ if self .secure_download_mode : # ESPTOOL-1231
113+ log .warning (
114+ "Baud rate change is not supported in secure download mode. "
115+ "Keeping 115200 baud."
116+ )
117+ return
112118 rom_with_26M_XTAL = not self .IS_STUB and self .get_crystal_freq () == 26
113119 if rom_with_26M_XTAL :
114120 # The code is copied over from ESPLoader.change_baud().
Original file line number Diff line number Diff line change @@ -145,7 +145,12 @@ def hard_reset(self):
145145 ESPLoader .hard_reset (self , self .uses_usb_jtag_serial ())
146146
147147 def change_baud (self , baud ):
148- if not self .IS_STUB :
148+ if self .secure_download_mode : # ESPTOOL-1231
149+ log .warning (
150+ "Baud rate change is not supported in secure download mode. "
151+ "Keeping 115200 baud."
152+ )
153+ elif not self .IS_STUB :
149154 crystal_freq_rom_expect = self .get_crystal_freq_rom_expect ()
150155 crystal_freq_detect = self .get_crystal_freq ()
151156 log .print (
You can’t perform that action at this time.
0 commit comments