-
Notifications
You must be signed in to change notification settings - Fork 49
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
Rtc binary only mode subseconds param. expressed in milliseconds #101
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Frederic Pillon <[email protected]>
else this prevent isConfigured(void) to return correct value. Signed-off-by: Frederic Pillon <[email protected]>
prediv was not properly computed and some misalignment's could occur depending of the RTC state at init. Signed-off-by: Frederic Pillon <[email protected]>
(a)synchronous prescalers values depend on the RTC clock source. Signed-off-by: Frederic Pillon <[email protected]>
This is valid when the RTC_BINARY_MIX mode exists in the RTC (bitfield in the RTC ICSR register) Set the RTC mode through a setBinaryMode function to be called before begin. Signed-off-by: Francois Ramu <[email protected]> Co-authored-by: Frederic Pillon <[email protected]>
Formatted with Arduino astyle. Signed-off-by: Frederic Pillon <[email protected]>
Configure the alarm depending on the MIX mode In case the RTC is running in MIX mode (binary and calendar), the subsecond register is a 32-bit value (and not msec) The Subsecond parameter is expressed in millisecond in RTC_SetTime/GetTime RTC_StartAlarm/GetAlarm Signed-off-by: Francois Ramu <[email protected]>
Signed-off-by: Francois Ramu <[email protected]>
Signed-off-by: Frederic Pillon <[email protected]>
Signed-off-by: Francois Ramu <[email protected]>
This examples is configuring the RTC in MIX (binary + calendar) or BCD and sets Alarm A & B (if exists) few ms after the current time. Signed-off-by: Francois Ramu <[email protected]>
In BIN ONLY mode, the Time and Date registers are 0. The Subsecond param in expressed in a nb of milliseconds on a 32-bit value. Signed-off-by: Francois Ramu <[email protected]>
This examples is configuring the RTC in BIN mode (binary only) and sets Alarm A & B (if exists) a few ms after the current time. Signed-off-by: Francois Ramu <[email protected]>
Signed-off-by: Frederic Pillon <[email protected]>
Signed-off-by: Frederic Pillon <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When the RTC is configured in BINARY only mode, only the Subsecond register is used
The getTime is a getSubSeconds with subSeconds parameter as a 32bit number of millliseconds
The setAlarm is a setAlarmSubSeconds with subSeconds parameter as a 32bit number of millliseconds
The getDate returns 0
The setTime has no effect execpt resetting the subseconds counter.
The setDate has no effect .
based on #93