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

ch_set_frequency is inconsistent #5

Open
vmanoj1996 opened this issue Jun 23, 2024 · 4 comments
Open

ch_set_frequency is inconsistent #5

vmanoj1996 opened this issue Jun 23, 2024 · 4 comments

Comments

@vmanoj1996
Copy link

ch_set_frequency function sets different frequencies everytime even when its arguments didnot change.

verified the same frequency using ch_get_frequency

@mhkline
Copy link

mhkline commented Jun 24, 2024

Hi @vmanoj1996. Can you tell us what the variation in the set frequency is?

Some variation is expected. There are a couple reasons for this:

  1. The on-chip digitally controlled oscillator has a finite step size. This is on the order of a few hundred Hz.
  2. When you set the frequency, the ICU chip runs a frequency search routine to find the closest frequency step to the frequency you specified.
  3. The frequency of the on-chip DCO may be re-measured when changing the operating frequency.

@vmanoj1996
Copy link
Author

I was getting really different numbers. The fluctuation was between ~52KHz to ~100kHz.
But I also found that some wires are loose. Lemme fix that for good and try again.

@mhkline
Copy link

mhkline commented Jun 24, 2024

Ah ok. Yes, that's way too much. I would expect no more than a few hundred Hz. Which part are you using? 30201?

@vmanoj1996
Copy link
Author

Yep. I am using 30201.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants