drivers/rtt_rtc: add RTT based RTC implementation, enable it for cpu/cc2538, nrf5x_common#13519
drivers/rtt_rtc: add RTT based RTC implementation, enable it for cpu/cc2538, nrf5x_common#13519gschorcht merged 6 commits intoRIOT-OS:masterfrom
Conversation
0f37191 to
f6aee80
Compare
|
@benpicco why is this wip now? |
|
Because the previous version was adding up rounding errors by dropping the sub-seconds and the real solution is much simpler. |
f31ee9a to
08a68d9
Compare
|
Forget it 😎 |
gschorcht
left a comment
There was a problem hiding this comment.
Please fix the typo and squash.
|
@benpicco Thanks for this contribution. |
|
@benpicco One question, should a CPU that use in its which doesn't pull in module |
|
If the RTT doesn't depend on a board feature (low frequency external oscillator), it can be added together with |
OK, then there's another question. If an application would claim a problem will occur. For that purpose, we have would always yield the conflict waring. Any idea? |
|
I noticed that problem too and was hoping no application would use both RTT and RTC… |
|
Maybe, we could realize it by defining a peripheral |
|
That would be a solution. I like the idea since it could also be used e.g. on ATmega where
|
Contribution description
This adds an emulated RTC based on top of the RTT implementation.
It is rather basic in that it only allows alarms to be set one full period of the RTT in the future.For a 32bit RTT running at 32kHz, this means you can set alarms at most 1½ days in the future.
Testing procedure
Run
tests/periph_rtcon e.g.openmote-b:Issues/PRs references
I moved the additions to the RTT driver to #13630
They are not needed anymore.