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 @@ -106,6 +106,12 @@ def get_crystal_freq(self):
106106 return ESPLoader .get_crystal_freq (self )
107107
108108 def change_baud (self , baud ):
109+ if self .secure_download_mode : # ESPTOOL-1231
110+ print (
111+ "WARNING: Baud rate change is not supported in secure download mode. "
112+ "Keeping 115200 baud."
113+ )
114+ return
109115 rom_with_26M_XTAL = not self .IS_STUB and self .get_crystal_freq () == 26
110116 if rom_with_26M_XTAL :
111117 # The code is copied over from ESPLoader.change_baud().
Original file line number Diff line number Diff line change @@ -132,7 +132,12 @@ def hard_reset(self):
132132 ESPLoader .hard_reset (self , self .uses_usb_jtag_serial ())
133133
134134 def change_baud (self , baud ):
135- if not self .IS_STUB :
135+ if self .secure_download_mode : # ESPTOOL-1231
136+ print (
137+ "WARNING: Baud rate change is not supported in secure download mode. "
138+ "Keeping 115200 baud."
139+ )
140+ elif not self .IS_STUB :
136141 crystal_freq_rom_expect = self .get_crystal_freq_rom_expect ()
137142 crystal_freq_detect = self .get_crystal_freq ()
138143 print (
You can’t perform that action at this time.
0 commit comments