Skip to content

Commit

Permalink
Merge pull request #155 from mossmann/offline
Browse files Browse the repository at this point in the history
cli: Use force_fpga_offline() to take FPGA offline
  • Loading branch information
antoinevg authored Jul 29, 2024
2 parents 07332f6 + 4352b80 commit 3015aab
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cynthion/python/src/commands/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import textwrap
import usb

from apollo_fpga.commands.cli import ensure_unconfigured
from cynthion import shared
from fwup.dfu import DFUTarget
from tqdm import tqdm
Expand Down Expand Up @@ -73,7 +72,7 @@ def flash_bitstream(device, filename):

logging.info(f"Updating FPGA configuration flash with {len(bitstream)} bytes...")

ensure_unconfigured(device)
device.force_fpga_offline()
with device.jtag as jtag:
programmer = device.create_jtag_programmer(jtag)
programmer.flash(bitstream, offset=0)
Expand Down Expand Up @@ -117,7 +116,7 @@ def flash_soc_firmware(device, filename):

logging.info(f"Updating SoC firmware flash with {len(firmware)} bytes...")

ensure_unconfigured(device)
device.force_fpga_offline()
with device.jtag as jtag:
programmer = device.create_jtag_programmer(jtag)
programmer.flash(firmware, offset=SOC_FIRMWARE_FLASHADDR)
Expand Down

0 comments on commit 3015aab

Please sign in to comment.