I am trying to capture traces on CW305, sometimes during the capture sequence during
ret = cw.capture_trace(scope, target, text, key), I get the following error. This only happens sometimes during capture_trace() and not all the time. Is there a reason for this?
ZeroDivisionError Traceback (most recent call last)
in
101 keys.append(key)
102
–> 103 ret = cw.capture_trace(scope, target, text, key)
104 if not ret:
105 print(“Failed capture”)
c:\users\myue8\chipwh~1\git\home\portable\chipwhisperer\software\chipwhisperer_init_.py in capture_trace(scope, target, plaintext, key, ack)
335 target.simpleserial_write(‘p’, plaintext)
336
–> 337 ret = scope.capture()
338
339 i = 0
c:\users\myue8\chipwh~1\git\home\portable\chipwhisperer\software\chipwhisperer\capture\scopes\OpenADC.py in capture(self)
344 # with DelayedKeyboardInterrupt():
345 if not self.adc.stream_mode:
–> 346 return self.qtadc.capture(self.adc.offset, self.clock.adc_freq, self.adc.samples)
347 else:
348 return self.qtadc.capture(None)
c:\users\myue8\chipwh~1\git\home\portable\chipwhisperer\software\chipwhisperer\capture\scopes_qt.py in capture(self, offset, adc_freq, samples)
108
109 def capture(self, offset=None, adc_freq=29.53E6, samples=24400):
–> 110 timeout = self.sc.capture(offset, adc_freq, samples)
111 timeout2 = self.read()
112
c:\users\myue8\chipwh~1\git\home\portable\chipwhisperer\software\chipwhisperer\capture\scopes_OpenADCInterface.py in capture(self, offset, adc_freq, samples)
2022 # give time for ADC to finish reading data
2023 # may need to adjust delay
-> 2024 cap_delay = (7.37E6 * 4 * samples) / (adc_freq * 24400)
2025 cap_delay *= 0.001
2026 time.sleep(cap_delay+sleeptime)
ZeroDivisionError: float division by zero