Capturing voltage of a target


I tried to capture the voltage of a target, not related to key extraction, just in general. However I could not capture a meaningful waveform. Only three values are in a 8000 long waveform, which are the following:
and around 0.002967 occassionally.
I am only using the measure SMA connector on a CW Lite, and the voltage varies between 3,2V and 3,32V on it(I checked with a 200MHz oscilloscope).

The configuration of the CW:

#Capture Traces
from tqdm import tnrange
import numpy as np
import time

#Configure scope
scope = cw.scope()
scope.clock.adc_src = “clkgen_x1”
scope.adc.samples = 8000

traces = []

print(“GPIO values at start:”)


while scope.advancedSettings.cwEXTRA.readTIOPins() != 3:

print(“Capturing voltage”)

while scope.advancedSettings.cwEXTRA.readTIOPins() == 3:

wave = scope.get_last_trace()
print(“Saving waveform”)

As can be seen, capture starts(and ends) when the target shifts the level of one of its GPIO pins.
Did I forget/overlook some configuration which is needed? The CW Lite AD9215(if I see it correctly) is a 10-bit ADC, so at 2Vp-p it should have more(than 2 bits) variation when it measures a noise of 120mV, right?


The default clock for the ChipWhisperer on startup is too high to run the ADC off of (with with `clkgen_x1) so you’ll need to lower that. Also I don’t think the scope works as you think it does based on your description and code.

  • scope.arm() arms the scope (think of this like hitting the single button on the oscilloscope). It won’t start capturing until the scope is triggered or the capture times out.
  • scope.capture() reads data back from the ChipWhisperer. It will block until the capture has finished (either from the ADC being triggered or the timeout occurring)
  • scope.get_last_trace() just returns the data that was read during the scope.capture() call.

I think what you’ll want to do is the following based on your code:

  • Set the clock to an appropriate value. Both clock DCMs should be locked (aka no red lights on on the ChipWhisperer)
  • Make sure the appropriate TIO pins are set as inputs (high_z)
  • Set the ChipWhisperer to trigger on whatever event you want to start the capture on (looks like some binary combination of three IO pins)
  • Remove the readTIOPins() calls

You might have to play around with the gain as well. Also keep in mind that the ChipWhisperer’s input is AC coupled (not sure if that’s a big deal with your use case).


Thanks Alex,

your suggestions helped to resolve the issue.

Happy to help, Norbert!

Let me know if you have any other questions.