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

Is ADC being overclocked? #473

Open
VK6TT opened this issue Oct 7, 2023 · 1 comment
Open

Is ADC being overclocked? #473

VK6TT opened this issue Oct 7, 2023 · 1 comment
Assignees

Comments

@VK6TT
Copy link
Collaborator

VK6TT commented Oct 7, 2023

I was poking around the ADC code today in mindev because I wanted to slow the CPU clock of a STM8S003 to power consumption but I still waned to do an ADC conversion.

If I understand this correctly the HSI clock has no prescaler giving a Fmaster of 16MHZ. When Fmaster feeds the ADC is is prescaled by 2 giving a ADC clock of 8MHZ. The maximum ADC clock is 6MHz but it is voltage dependent. It is only 4MHz at 3V.

Could the fix be to load ADC_CR1 with $20, instead of using #0, giving a prescaler of 4?

@TG9541
Copy link
Owner

TG9541 commented Oct 7, 2023 via email

@TG9541 TG9541 self-assigned this Oct 7, 2023
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