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

Added getPrescaler( ); setPrescaler( ); for calibrating STM32F1xx during runtime. #38

Closed
wants to merge 8 commits into from

Conversation

HamidSaffari
Copy link

Added getPrescaler(uint32_t *prescaler); and setPrescaler(uint32_t prescaler); for calibrating STM32F1xx during runtime.

…ler); for calibrating STM32F1xx during runtime.
…ler); for calibrating STM32F1xx during runtime.
…ler); for calibrating STM32F1xx during runtime.
…ler); for calibrating STM32F1xx during runtime.
…ler); for calibrating STM32F1xx during runtime.
@fpistm fpistm added this to the 1.1.0 milestone Nov 11, 2020
@fpistm fpistm modified the milestones: 2.0.0, 2.x.x Apr 22, 2021
@fpistm fpistm modified the milestones: 1.1.1, 1.2.0 Oct 1, 2021
@FRASTM
Copy link
Contributor

FRASTM commented Nov 19, 2021

The stm32F1 has a different prescaler setting from other stm32 devices. It is purely asynchronous 8+16 bit factor, hold on a 32bit value.
Setting the prescaler is writing the (write-only) PRL registers
Reading the prescaler (on the Read-only reg DIV).

That's why (I guess) new API is proposed for stm32F1 serie using a single 32bit factor.

Another proposal is to keep the existing STM32RTC::setPrediv and STM32RTC::getPrediv
giving a 32bit value (as the 1st param and ignoring the second) in case of stm32F1

@fpistm
Copy link
Member

fpistm commented Nov 23, 2021

Thanks @HamidSaffari for your contribution and sorry for the delay to handle this PR.
I close this PR as it is superseded by #56.

@fpistm fpistm closed this Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants