Jump to content
  • 0

Sample rate / actual sample rate confusion MCC172



I've notice that no matter what I set the sample_rate to I always get ~51KHZ sampling which is leading (I think) to buffer overflow as I'm reading out only a fraction of what is being produced?

So I guess I'm confused by the fact that mcc172_a_in_clock_config_write uses sample_rate yet mcc172_a_in_clock_config_read uses &actual_sample_rate.

Is there a way of explicitly setting the read rate? or do I have to use actual_sample_rate?

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0


The MCC 172 supports a subset of ranges. The formula is 51.2k / 1..256. If you pass an invalid value, it will pick the next closest valid value. Use mcc172_a_in_clock_write to set the sample rate to 2048. Use mcc172_a_in_clock_config_read to read actual_sample_rate; the two rates should match at 2048. However, it is more than a simple matter of calling mcc172_a_in_clock_config_read once. Call it several times until synced parameter comes back true. Take a look at the continuous_scan.c example.

Best regards,


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...