Hello, I want to implement clock glitch attack in CW305. Following this link I have configured j16 switch. my scope looks like following:
scope = cw.scope()
scope.gain.db = 25
scope.clock.clkgen_freq = 10E6
scope.adc.samples = 500 #500 before
scope.adc.offset = 0
scope.adc.basic_mode = "rising_edge"
scope.trigger.triggers = "tio4"
scope.io.tio1 = "serial_rx"
scope.io.tio2 = "serial_tx"
scope.io.hs2 = "disabled"
scope.adc.timeout = .5
Then, I did not setup any PLL from target cw305. I have configured ADC clock using scope.clock.adc_src = "clkgen_x4"
then locked ADC using following
import time
for i in range(5):
scope.clock.reset_adc()
time.sleep(1)
if scope.clock.adc_locked:
break
assert (scope.clock.adc_locked), "ADC failed to lock"
I think I have done the major parts but still seeing timeout error. The design is working fine if I just set 0 to j16 but does not work if i set 0 there. What could be the issue? Before adding glitch i want to run the design on scope’s clock.