Hello,
I’m trying to capture some traces longer than 24000 samples using CW-lite. Do do so, I’m repeating the same operation more than once, using the ADC’s offset parameter to acquire different portion of the trace. This normally works fine, but in some cases I’m getting abnormal traces:
Plotted 1 sample out of 10, so the trace are fine for the first 24000 samples, the problem lies with the second portion acquired with an offset.
I’m also getting these errors during the acquisition, I’ve never got them while not using offset:
The code I’m using:
def capture_long_trace(scope, target, adc_samples, text, key, j):
while True:
scope.adc.offset = 0
if scope.adc.offset == 0:
break
while True:
trace = cw.capture_trace(scope, target, text, key)
if trace is not None:
break
print(f"'None' trace returned for first segment of trace n.{j}")
tot_len = scope.adc.trig_count
if tot_len <= adc_samples:
complete_wave = trace.wave
else:
n_acquisitions = ceil(tot_len / adc_samples)
complete_wave = np.empty((0))
complete_wave = np.concatenate((complete_wave, trace.wave))
for i in range(1, n_acquisitions):
offset = adc_samples * i
while True:
scope.adc.offset = offset
if scope.adc.offset == offset:
break
while True:
trace = cw.capture_trace(scope, target, text, key)
if trace is not None:
break
print(f"'None' trace returned for {i}th segment of trace n.{j}")
complete_wave = np.concatenate((complete_wave, trace.wave))
return complete_wave, tot_len
Doing the following to be sure that the offset is correctly set but it does not help-
while True:
scope.adc.offset = offset
if scope.adc.offset == offset:
break
I’m attaching the entire jupyter notebook.
ADC_offset_test.zip (261.8 KB)
Any idea why this happens?
Note: I’m using AES to show you the problem, but I need this to capture long RSA traces.