Skip to content

Commit

Permalink
Only run firmware from the bootloader if we have bootloader reset and
Browse files Browse the repository at this point in the history
other probe methods

Fixes #52
  • Loading branch information
darkxst committed Dec 21, 2023
1 parent 4875aa7 commit f54b890
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions universal_silabs_flasher/flasher.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,14 @@ async def probe_app_type(

bootloader_probe = None

# Only run firmware from the bootloader if we have other probe methods
# Only run firmware from the bootloader if we have bootloader reset and
# other probe methods
only_probe_bootloader = types == [ApplicationType.GECKO_BOOTLOADER]
run_firmware = self._reset_target and not only_probe_bootloader
probe_funcs = {
ApplicationType.GECKO_BOOTLOADER: (
lambda baudrate: self.probe_gecko_bootloader(
run_firmware=(not only_probe_bootloader), baudrate=baudrate
run_firmware=run_firmware, baudrate=baudrate
)
),
ApplicationType.CPC: self.probe_cpc,
Expand Down

0 comments on commit f54b890

Please sign in to comment.