Help with adc_src: sampling rate implication

Hello, I’m a beginner in this subject and I’m still trying to understand a few basic concepts.

I have a board with an external oscillator that provides a 10MHz clock signal to a chip, and the CPU of that chip runs at 20MHz. I removed this 10MHz clock oscillator and now I’m providing a 10MHz clock signal from the ChipWhisperer Lite. The clkgen_freq = 10 MHz.

At what adc_freq should I be measuring the power from the device, considering that the CPU of the target chip is said to run at 20MHz. Can I use adc_src = clkgen_x1, meaning adc_freq = 10 MHz, or do I have to use adc_src = clkgen_x4? What are the implications for the attack?

In this case, by using adc_src = clkgen_x1 does it means that I’m acquiring the samples at half the frequency of the target device?

In chipwhisperer-jupyter/Lab 6_4 - Jittery Triggering on UART.ipynb at master · newaetech/chipwhisperer-jupyter · GitHub it is said that:
“But by running the ADC clock at x1 the target, instead of x4, we basically get 4 times as many useful sample points.”.

Does this means that it is better to use x1 instead of x4?
How can I know when it is better to use x1 instead of x4, or the other way around?

Thank you in advance !

Correct.

I see your confusion. The difference between x1 and x4 here is that for a fixed number of scope.adc.samples (e.g. if using a CW-lite, this is maximum 24400), then x1 gives you a capture over a 4 times longer time period than x4.

x4 is only worse in that the power traces will require more storage and you won’t be able to capture for as long, time-wise. In other words, x4 is better except when it’s not. In practice, attacks can work quite well with x1.

Excellent clarification.
Thanks, really!