From 298b6f182122a80ef2407f2b43831c2ccb7923a3 Mon Sep 17 00:00:00 2001 From: travisutk Date: Fri, 17 Sep 2010 20:44:38 +0000 Subject: [PATCH] Nearing 16-bit clock control data. git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@724 12e2690d-a6be-4b82-a7b7-67c4a43b65c8 --- client/GoodFET.py | 13 +++++++++---- client/goodfet.monitor | 4 ++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/client/GoodFET.py b/client/GoodFET.py index c3ab99e..b6d9033 100755 --- a/client/GoodFET.py +++ b/client/GoodFET.py @@ -465,10 +465,15 @@ class GoodFET: return 0; return 1; def monitorclocking(self): - DCOCTL=self.peekbyte(0x0056); - BCSCTL1=self.peekbyte(0x0057); - return "0x%02x, 0x%02x" % (DCOCTL, BCSCTL1); - + """Return the 16-bit clocking value.""" + return "0x%04x" % self.monitorgetclock(); + + def monitorsetclock(self,clock): + """Set the clocking value.""" + self.poke16(0x56, clock); + def monitorgetclock(self): + """Get the clocking value.""" + return self.peek16(0x56); # The following functions ought to be implemented in # every client. diff --git a/client/goodfet.monitor b/client/goodfet.monitor index bbed793..ea0dd68 100755 --- a/client/goodfet.monitor +++ b/client/goodfet.monitor @@ -48,6 +48,10 @@ if(sys.argv[1]=="exec"): if(sys.argv[1]=="info"): print "GoodFET with %s MCU" % client.infostring(); print "Clocked at %s" % client.monitorclocking(); +if(sys.argv[1]=="clocktest"): + print "GoodFET with %s MCU" % client.infostring(); + print "Clocked at %s" % client.monitorclocking(); + if(sys.argv[1]=="ramfill"): client.monitor_ram_pattern(); if(sys.argv[1]=="ramdepth"): -- 2.20.1