frequency_count_khz() is a bit too inaccurate #860

Open
opened 2022-06-10 11:58:09 -05:00 by bruelltuete · 0 comments
bruelltuete commented 2022-06-10 11:58:09 -05:00 (Migrated from github.com)

frequency_count_khz() returns a frequency measurement of a given clock, by sdk-default, with an accuracy of 2 kHz. The interval value of 10 means 2 kHz, as per data sheet.

Unfortunately, measuring the frequency of clock_ref often (very often) gives me 12001 kHz. That is, counting cycles against itself is already off. That's not great... Should the default interval be 12, giving us 500 Hz? That would be appropriate for a function that returns kHz.

frequency_count_khz() returns a frequency measurement of a given clock, by sdk-default, with an accuracy of 2 kHz. The interval value of 10 means 2 kHz, as per data sheet. Unfortunately, measuring the frequency of clock_ref often (very often) gives me 12001 kHz. That is, counting cycles against itself is already off. That's not great... Should the default interval be 12, giving us 500 Hz? That would be appropriate for a function that returns kHz.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-raspberrypi/pico-sdk#860
No description provided.