I have a CW1200 that I am trying to clock externally with a microcontroller. This MCU outputs a 4 MHz square wave (see picture):
Following the diagram found on: Scope API — ChipWhisperer 5.6.1 documentation, I initially set the
clkgen_src = 'extclk' to input this 4 MHz wave. The actual AES engine that I would like to sample is running at 16 MHz so I am attempting to set the ADC rate at about 48 MHz via the
clkgen_div attributes. In order to do so, I attempt to multiply the 4MHz wave by 12 (
clkgen_mul = 12) and divide by 1 (
clkgen_div = 1). I then set the
adc_src = 'clkgen_x1' which as I understand should take this multiplied wave and pass it through to clock the ADC directly.
Unfortunately, I am unable to get the CLKGEN and ADC modules to lock (and also the intended clock rates)when using the following python code:
scope.adc.samples = 68000
scope.adc.presamples = 2500
scope.adc.timeout = 3
scope.adc.decimate = 1 # ADC Sampling Rate
scope.clock.clkgen_src = "extclk" #extclk / system
scope.clock.clkgen_mul = 12 #2-256, starting with 4MHz system
scope.clock.clkgen_div = 1 #1-256, starting with 4MHz system
scope.clock.adc_src = "clkgen_x1"
scope.clock.extclk_freq = 4000000
I seem to be misunderstanding something or perhaps setting some attribute(s) to an incorrect value for my situation. Any help is greatly appreciated.