How can i use external clock in CW305

I want to use a clock generated by external clock generator for my cw305 target board. I see configuring S2 its possible to use clock from cw capture board but i can’t find the way to use a configuration for external clock. I see a port named N13 is written as CLK IN in the CW305 board.

You can feed in a clock on the middle SMA (labelled CLKIN / N11); it goes to FPGA pin N11.
Our example CW305 projects don’t use this clock input; you’ll have to modify the .xdc constraints file to declare and connect the clock to an input of your FPGA code.

For this and any other “off-the-beaten” path changes, the CW305 schematic will come in handy.

I doing clock glitch fault attack on CW305 board’s microcontroller. I tried with external clock N11 (overclocking) and it is successed. Now I want to perform clock glitch on internal clock? But I didn’t find internal clock/ which pin is internal clock.

Tips :- I don’t want to use extra board like (cw-lite)… i want to perform clock glitch on cw305 same board on internal clock?

The CW305 has a PLL which can provide a clock to the FPGA on two different pins; see here.

That is not something we support. You need a CW-lite (or Pro or Husky) to generate a glitchy clock.

Thanks for quick reply. For that i have to use cw-lite or other boards.

How can I write clock glitch code for cw305 board using cw-lite to generate glitch. I found examples only of AES. But i want to check for noraml clock. I design countermeasure and uploaded this bitstream on cw305 board? Now I have to perform clock glitch (fault injection attack) but I didn’t know how to start beacuse I only found AES based glitch?

Correct! We don’t have any examples for this. There are many ways you can go about this. For example you could use a soft core and run the same target firmware that we use in our fault notebooks.

I know that others have done clock glitching work using the ARM DesignStart soft core on the CW305, and there is support for it (see here).

When I try to inject clock glitch on cw305:- first I configure glitch parameters and then genrate the glitch but I am getting this error :-
--------------I use this code-------------------------
import chipwhisperer as cw
import time
scope = cw.scope()
bitstream = r"/home/sevdaa/Downloads/me new/test_one_detector/test_one_detector.runs/impl_2_copy_1/main.bit"

scope can also be None here, unlike with the default SimpleSerial

target =,cw.targets.CW305, bsfile=bitstream, force=True, slurp=False)

scope.clock.clkgen_freq = 10E6 # Set the clock frequency (adjust as needed)
scope.clock.adc_src = “clkgen_x1”
scope.glitch.clk_src = “clkgen” = True # Enable high-power glitching = True # Disable low-power glitching
scope.glitch.output = “clock_xor” # Set the glitch output mode

scope.glitch.width = 7 # Glitch width in clock cycles
scope.glitch.offset = 20 # Glitch offset in clock cycles
scope.glitch.repeat = 1 # Number of glitches to repeat
scope.glitch.trigger_src = “ext_single”

num_traces = 100
trace_length = 5000
traces =

but after :- for i in range(num_traces):
target.go() # Start target execution
trace = scope.getLastTrace()

but after this I am gettinge this error :-

(ChipWhisperer Target ERROR|File target.REG_USER_LED unset. Have you given target a verilog defines file?
/home/sevdaa/Documents/ChipWhisperer/chipwhisperer/software/chipwhisperer/common/utils/ UserWarning: getLastTrace function is deprecated use get_last_trace instead. This function will be removed in ChipWhisperer 5.7.0
warnings.warn(‘{} function is deprecated use {} instead. This function will be removed in ChipWhisperer 5.7.0’.format(cc_func,
(ChipWhisperer Target ERROR|File target.REG_USER_LED unset. Have you given target a verilog defines file?

How can i resolve this error if you have any idea?

Have a look at; there’s a bunch of register addresses initialized to None here; they are expected to get their proper values (the actual corresponding register address) from this.

Many of the methods rely on these registers to do what it’s called to do.

When you connect to the target object with slurp=False, doesn’t know what those register addresses are. Since you have a custom CW305 design, maybe you don’t have some of those registers. And that’s totally fine, but then you can’t use as-is. You can either customize it to suit your particular design, or extend it as we do with