Skip to content

cpu/stm32f1: make RTC Y2038 safe#13520

Merged
benpicco merged 1 commit intoRIOT-OS:masterfrom
benpicco:rtc_mktime-convert
Mar 3, 2020
Merged

cpu/stm32f1: make RTC Y2038 safe#13520
benpicco merged 1 commit intoRIOT-OS:masterfrom
benpicco:rtc_mktime-convert

Conversation

@benpicco
Copy link
Copy Markdown
Contributor

Contribution description

This converts the stm32f1 RTC implementations to use the new rtc_mktime() & rtc_localtime() functions.

This allows the RTC to operate for another 118 years.

Testing procedure

Run tests/periph_rtc on e.g. a bluepill board.

Issues/PRs references

depends on #13284
addresses #13277

Use rtc_* functions with custom EPOCH.
This buys us about 118 years.
@benpicco benpicco added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation State: waiting for other PR State: The PR requires another PR to be merged first Area: cpu Area: CPU/MCU ports labels Feb 29, 2020
Copy link
Copy Markdown
Contributor

@gschorcht gschorcht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but might become obsolete if commit e1c14c6 is kept as part of PR #13284.

@gschorcht gschorcht added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed State: waiting for other PR State: The PR requires another PR to be merged first labels Mar 3, 2020
@kaspar030 kaspar030 added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Mar 3, 2020
@benpicco benpicco merged commit 1765901 into RIOT-OS:master Mar 3, 2020
@leandrolanzieri leandrolanzieri added this to the Release 2020.04 milestone Mar 13, 2020
@benpicco benpicco deleted the rtc_mktime-convert branch August 27, 2020 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: cpu Area: CPU/MCU ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants