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

add adc fix from driver #584

Merged
merged 1 commit into from
Aug 3, 2022
Merged

add adc fix from driver #584

merged 1 commit into from
Aug 3, 2022

Conversation

nkrackow
Copy link
Contributor

@nkrackow nkrackow commented Aug 3, 2022

Very small PR to fix the internal ADCs by setting the clock prescalers and then recalibrating. Code from the driver branch.

@nkrackow nkrackow requested a review from jordens August 3, 2022 08:58
@ryan-summers
Copy link
Member

This doesn't seem to have fixed CPU temperature measurement appearing to be erratic:
image

@nkrackow
Copy link
Contributor Author

nkrackow commented Aug 3, 2022

Hmm, let me quickly check about the other channels.

@nkrackow
Copy link
Contributor Author

nkrackow commented Aug 3, 2022

Ok, I've confirmed that exactly these changes lead to the external inputs being very accurate. Without the changes we have the same ~3% error observed before.
I tested it by just printing adc values in an infinite loop after initialization but using exactly the same code otherwise.

@nkrackow
Copy link
Contributor Author

nkrackow commented Aug 3, 2022

That means that the CPU temp readings have an additional, probably unrelated issue.

@ryan-summers
Copy link
Member

Hmm, then perhaps the ADC clock is not the only issue with CPU measurement stability. I'll open up an issue.

@jordens
Copy link
Member

jordens commented Aug 3, 2022

Ack. But then we should land this.
bors r+

@bors
Copy link
Contributor

bors bot commented Aug 3, 2022

Build succeeded:

@bors bors bot merged commit e5f66b9 into master Aug 3, 2022
@bors bors bot deleted the nk/internal-adc-fix branch August 3, 2022 09:39
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

Successfully merging this pull request may close these issues.

4 participants