-
Notifications
You must be signed in to change notification settings - Fork 51
stm32F1 set/get prescaler div interface change #56
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
Conversation
59ddcf4
to
9103ae5
Compare
Requires change in the |
Creating new set/get prediv interface for the stm32F1 where parameters differ from other soc series. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default value should be RTC_AUTO_1_SECOND
then uin32_t
should be used to avoid cast?
with suggested changes, removing parameters when useless |
Using the stm32F1 existing functions to write/read the RTC prescaler registers (hold by the prediv var). In that case only one param is considered. Signed-off-by: Francois Ramu <[email protected]>
The stm32F1 prescaler is asynchronous and mapped on a 32bit param. Signed-off-by: Francois Ramu <[email protected]>
add declaration in the rtc.h |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR is defining the set/getPrediv functions in case of stm32F1
With this soc device, the prescaler is a 32bit value corresponding to the DIV registers (read-only) or PREScaler registers (write-only). This configuration is adapted to keep the interface unchanged for other soc.
The
prediv
variable is keeping the value read or written.The RTC_init is not changed.
This PR supersed #38
Requires the change in the stm32duino/STM32Examples : stm32duino/STM32Examples#53
Signed-off-by: Francois Ramu [email protected]