Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Husky: frequency-dependent ADC sampling clock phase when using external clock #501

Open
jpcrypt opened this issue Nov 14, 2024 · 1 comment
Assignees
Labels

Comments

@jpcrypt
Copy link
Contributor

jpcrypt commented Nov 14, 2024

When scope.clock.clkgen_src = 'extclk', the relative phase between the HS1 target clock and the ADC sampling clock depends on the target clock frequency.

This is similar, but not directly related to #490: with that issue fixed, a frequency-dependent phase is still observed. The phase observed with this present issue is 100% reproducible: for a given target clock frequency, the ADC sampling phase will always be the same (if a fix to #490 has been applied). The ADC clock rising edge can be anywhere within the target clock period.

This issue is due to not using the CDCI6214 PLL's zero-delay mode and has been resolved with help from TI; a fix is forthcoming as part of other fixes and improvements to the Husky clock management code.

For users currently using the CW develop branch or the 5.7.0 release, this, in addition to related clock phase issues (#490, #499) means that if you're using scope.clock.clkgen_src = 'extclk', the ADC sampling phase:

  1. may not be consistent from run to run
  2. will vary if you change the target clock.
@jpcrypt
Copy link
Contributor Author

jpcrypt commented Nov 19, 2024

A consequence of this fix: zero-delay mode can't be used when the reference (target) clock is > 100 MHz.
In that case, we can't make any promises on the phase relationship between the target and ADC clocks, or define what that phase is. However, our tests show that this phase is constant, but frequency-dependent.

jpcrypt added a commit that referenced this issue Nov 25, 2024
Covers #490,
#499,
#501, and
#448.

Not added to test_husky.py because it's useful to be able to plot and
interact with failing cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant