Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: GlasgowEmbedded/glasgow
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 45fec46f4dd2
Choose a base ref
...
head repository: GlasgowEmbedded/glasgow
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: ec0b7fbde4dd
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Jul 31, 2020

  1. Copy the full SHA
    ec0b7fb View commit details
Showing with 10 additions and 2 deletions.
  1. +8 −0 software/glasgow/applet/program/avr/__init__.py
  2. +2 −2 software/glasgow/applet/program/avr/spi.py
8 changes: 8 additions & 0 deletions software/glasgow/applet/program/avr/__init__.py
Original file line number Diff line number Diff line change
@@ -291,6 +291,14 @@ async def interact(self, device, args, avr_iface):
raise ProgramAVRError("verification of high fuse failed: %s" %
"{:08b} != {:08b}".format(written, args.high))

if args.extra:
self.logger.info("writing extra fuse")
await avr_iface.write_fuse(2, args.extra)
written = await avr_iface.read_fuse(2)
if written != args.extra:
raise ProgramAVRError("verification of extra fuse failed: %s" %
"{:08b} != {:08b}".format(written, args.extra))

if args.operation == "write-lock":
self.logger.info("writing lock bits")
await avr_iface.write_lock_bits(args.bits)
4 changes: 2 additions & 2 deletions software/glasgow/applet/program/avr/spi.py
Original file line number Diff line number Diff line change
@@ -60,7 +60,7 @@ async def read_signature(self):

async def read_fuse(self, address):
self._log("read fuse address %#04x", address)
a1, a0 = {
a0, a1 = {
0: (0b0000, 0b0000),
1: (0b1000, 0b1000),
2: (0b0000, 0b1000),
@@ -72,7 +72,7 @@ async def read_fuse(self, address):
return data

async def write_fuse(self, address, data):
self._log("write fuse address %d data %02x", address, data)
self._log("write fuse address %#04x data %02x", address, data)
a = {
0: 0b0000,
1: 0b1000,