CWLITE Sample Speed Adjustment

Hello this question is similar to “CWLite Sampling Question” this one.

I am working with a CWLITE with default XMEGA target. When I use the CW, I set up using the GitHub-provided default setup script. However, I wonder what is the default sampling speed per second on this thing? And if I want to bump it up to max ADC sampling rate, how do I do that via API?

I saw the API documentation that ADC is not a set-able thing, which is why I come and ask.

Thanks!

Hi,

The ADC frequency is tied to the clkgen frequency (scope.clock.clkgen_freq). By default, the ADC runs at 4x the frequency of the clkgen frequency (scope.clock.adc_src). Note clkgen freq is the same as whats sent over HS2, so if you’re using that clock for your target, it will have to run at a minimum of 26.25MHz.

Alex

Alex

Thanks for the reply. Hence, can I assume that if I want to increase the sampling accuracy (frequency) I can simply just bump up the value of scope.clock.clkgen_freq to some factor of scope.clock.adc_src?

For example, can I write my code like scope.clock.clkgen_freq = 6*scope.clock.adc_src so I get 6x freq?

Or I am thinking too naively.

No, adc_src selects between 1x and 4x the sampling frequency. You should check out the documentation for the scope.clock module: Scope API — ChipWhisperer 5.7.0 documentation

Alex