X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=client%2FGoodFETCC.py;h=1d5a7b76c67a29d1906fbcdedddec484900187db;hp=3937c62b1a7c35e515e871d03cbc1c4c98e0b3c4;hb=a8b686459e73c8a37df4537083a675fc21de4699;hpb=363ca47c79cf3a39dca93a54fe48e0253c946c8b diff --git a/client/GoodFETCC.py b/client/GoodFETCC.py index 3937c62..1d5a7b7 100644 --- a/client/GoodFETCC.py +++ b/client/GoodFETCC.py @@ -38,8 +38,13 @@ class GoodFETCC(GoodFET): self.SRF_loadsymbols(); self.haveloadedsymbols=True; except: - print "SmartRF not found for this chip."; + ident=self.CCident(); + if ident==0x0000 or ident==0xFFFF: + print "Chip ID is 0x%04x, implying a wiring problem." % ident; + else: + print "SmartRF not found for chip 0x%04x." % ident; def SRF_chipdom(self,chip="cc1110", doc="register_definition.xml"): + #def SRF_chipdom(self,chip="cc1110", doc="workingconfig.xml"): """Loads the chip XML definitions from SmartRF7.""" fn="%s/config/xml/%s/%s" % (self.smartrfpath,chip,doc); #print "Opening %s" % fn; @@ -411,9 +416,15 @@ class GoodFETCC(GoodFET): self.pokebysym("SYNC0",0xB0); self.pokebysym("ADDR", 0xB0); return; - def config_ook(self,band="none"): - self.pokebysym("FSCTRL1" , 0x0C) #08 # Frequency synthesizer control. - self.pokebysym("FSCTRL0" , 0x00) # Frequency synthesizer control. + + def config_ademco(self, band="lf"): + pass + # FIXME Temporary placeholder for me to write the Ademco protocol into the GoodFET Chipcon Application + # TODO Also, write a class that takes in the XML registration files and sets values (not just addresses) + + def config_ook(self,band="none"): + self.pokebysym("FSCTRL1" , 0x0C) #08 # Frequency synthesizer control. + self.pokebysym("FSCTRL0" , 0x00) # Frequency synthesizer control. #Don't change these while the radio is active. self.pokebysym("FSCAL3" , 0xEA) # Frequency synthesizer calibration. @@ -701,7 +712,7 @@ class GoodFETCC(GoodFET): if(ident1!=ident2 or ident2!=ident3): print "Error, repeated ident attempts unequal." print "%04x, %04x, %04x" % (ident1, ident2, ident3); - + #Single step, printing PC. print "Tracing execution at startup." for i in range(1,15): @@ -747,16 +758,16 @@ class GoodFETCC(GoodFET): self.CClockchip(); - CCversions={0x0100:"CC1110", - 0x1100:"CC1111", - 0x8500:"CC2430", - 0x8900:"CC2431", - 0x8100:"CC2510", - 0x9100:"CC2511", - 0xA500:"CC2530", #page 57 of SWRU191B - 0xB500:"CC2531", - 0x9500:"CC2533", - 0x8D00:"CC2540", + CCversions={0x0100:"cc1110", + 0x1100:"cc1111", + 0x8500:"cc2430", + 0x8900:"cc2431", + 0x8100:"cc2510", + 0x9100:"cc2511", + 0xA500:"cc2530", #page 57 of SWRU191B + 0xB500:"cc2531", + 0x9500:"cc2533", + 0x8D00:"cc2540", 0xFF00:"CCmissing"}; execbuf=None; CCexecbuf= {0x0100:0xF000,