hello together,
i have the following problem.
when i run the code
SCOPETYPE = ‘OPENADC’
PLATFORM = ‘CWLITEXMEGA’
import chipwhisperer as cw
scope = cw.scope()
scope.default_setup()
prog = cw.programmers.XMEGAProgrammer
cw.program_target(scope, prog , “chipwhisperer/hardware/victims/firmware/basic-passwdcheck/basic-passwdcheck-{}.hex”.format(PLATFORM))
i get the following error code
OSError Traceback (most recent call last)
in
1 scope.default_setup()
2 prog = cw.programmers.XMEGAProgrammer
----> 3 cw.program_target(scope, prog , “chipwhisperer/hardware/victims/firmware/basic-passwdcheck/basic-passwdcheck-{}.hex”.format(PLATFORM))
~/Videos/chipwhisperer/software/chipwhisperer/init.py in program_target(scope, prog_type, fw_path, **kwargs)
60 prog._logging = None
61 prog.open()
—> 62 prog.find()
63 prog.erase()
64 prog.program(fw_path, memtype=“flash”, verify=True)
~/Videos/chipwhisperer/software/chipwhisperer/capture/api/programmers.py in func_wrapper(self, *args, **kwargs)
68 self.scope.io.nrst = ‘high_z’
69 try:
—> 70 val = func(self, *args, **kwargs)
71 finally:
72 logging.debug(‘Restoring pdic, pdid, and nrst pin configuration’)
~/Videos/chipwhisperer/software/chipwhisperer/capture/api/programmers.py in find(self, xmega)
223 def find(self, xmega=None):
224 xmega = self.xmegaprog()
–> 225 sig, chip = xmega.find()
226
227 # Print signature of unknown device
~/Videos/chipwhisperer/software/chipwhisperer/hardware/naeusb/programmer_xmega.py in find(self)
173 def find(self):
174 self.setParamTimeout(100)
–> 175 self.enablePDI(True)
176
177 # Read signature bytes
~/Videos/chipwhisperer/software/chipwhisperer/hardware/naeusb/programmer_xmega.py in enablePDI(self, status)
307 if status:
308 # self._xmegaDoWrite(self.XPROG_CMD_LEAVE_PROGMODE)
–> 309 self._xmegaDoWrite(self.XPROG_CMD_ENTER_PROGMODE)
310 self._pdienabled = True
311 else:
~/Videos/chipwhisperer/software/chipwhisperer/hardware/naeusb/programmer_xmega.py in _xmegaDoWrite(self, cmd, data, checkStatus)
502 status = self._xmegaDoRead(cmd=0x0020, dlen=3)
503 if status[1] != 0x00:
–> 504 raise IOError(“XMEGA Command %x failed: err=%x, timeout=%d” % (status[0], status[1], status[2]))
505
506 def _xmegaDoRead(self, cmd, dlen=1):
OSError: XMEGA Command 20 failed: err=1, timeout=1
can anybody help me? i don’t understand what is wrong.
ben