diff --git a/pytest-embedded-nuttx/pytest_embedded_nuttx/serial.py b/pytest-embedded-nuttx/pytest_embedded_nuttx/serial.py index 6fc30733..9a55ba60 100644 --- a/pytest-embedded-nuttx/pytest_embedded_nuttx/serial.py +++ b/pytest-embedded-nuttx/pytest_embedded_nuttx/serial.py @@ -76,6 +76,12 @@ def get_key_from_value(dictionary, val): # Flash Mode self.flash_mode = get_key_from_value(FLASH_MODES, image.flash_mode) + # From esp-idf/components/esptool_py: + # We use esptool.py to flash bootloader in dio mode for QIO/QOUT, bootloader then + # upgrades itself to quad mode during initialization. + if self.flash_mode in ('qio', 'qout'): + self.flash_mode = 'dio' + @EspSerial.use_esptool() def flash(self) -> None: """Flash the binary files to the board."""