def test_020_program_production(self): productionFile = "firmware/BlinkyTape-Production.hex" returnCode = IcspUtils.loadFlash(self.port, productionFile) self.assertEqual(returnCode, 0) self.stopMe = False
def flashFirmware(portName): print "Writing firmware on %s" % portName result = IcspUtils.loadFlash(portName, "firmware/BlinkyTape-Application.hex", "avr109") if (result[0] != 0): print result pass
def test_010_program_fuses(self): lockFuses = 0x3f eFuses = 0xcb hFuses = 0xd8 lFuses = 0xff returnCode = IcspUtils.writeFuses(self.port, lockFuses, eFuses, hFuses, lFuses) self.assertEqual(returnCode, 0) self.stopMe = False
def test_010_program_fuses(self): lockFuses = 0x2F eFuses = 0xCB hFuses = 0xD8 lFuses = 0xFF returnCode = IcspUtils.writeFuses(self.port, lockFuses, eFuses, hFuses, lFuses) self.assertEqual(returnCode, 0) self.stopMe = False
def test_020_program_production(self): self.i.DisplayMessage("Programming firmware...") self.testRig.connect(self.port) self.testRig.resetState() self.testRig.enableRelay('EN_USB_VCC') self.testRig.enableRelay('EN_USB_GND') self.testRig.setProgrammerSpeed(1) self.testRig.disconnect() productionFile = "firmware/BlinkyTape-Production.hex" result = IcspUtils.loadFlash(self.port, productionFile) self.LogDataPoint('firmware stdout', result[1]) self.LogDataPoint('firmware stderr', result[2]) self.assertEqual(result[0], 0) self.stopMe = False
def test_010_program_fuses(self): self.i.DisplayMessage("Programming fuses...") self.testRig.resetState() self.testRig.enableRelay('EN_USB_VCC') self.testRig.enableRelay('EN_USB_GND') self.testRig.setProgrammerSpeed(0) self.testRig.disconnect() lockFuses = 0x2F eFuses = 0xCB hFuses = 0xD8 lFuses = 0xFF # lFuses = 0x5E #default result = IcspUtils.writeFuses(self.port, lockFuses, eFuses, hFuses, lFuses) self.LogDataPoint('fuses stdout', result[1]) self.LogDataPoint('fuses stderr', result[2]) self.assertEqual(result[0], 0) self.stopMe = False
def flashFirmware(portName): print "Writing firmware on %s"%portName result = IcspUtils.loadFlash(portName, "firmware/BlinkyTape-Application.hex", "avr109") if(result[0] != 0): print result pass