[riot-notifications] [RIOT-OS/RIOT] cpu/atmega_common: RTT and RTC support (#8842)

Juan I Carrano notifications at github.com
Thu Apr 25 14:04:35 CEST 2019

The way I see volatile in the context of this PR is that the timer extension variables are effectively "software registers". While there may be a way to make this work without marking them as volatile they behave, from the point of view if code running _outside_ of ISR, as hardware registers so it is quite convenient to treat them as such.

When interrupts are disabled they are regular variables and in that case the volatile is not needed. I don't think it is a big issue. The solution wold be to split the code, the ISR code sees a not volatile declaration and the user-facing code sees volatile (using for example `extern volatile ...`). Again, I would not consider it a big deal or worth the trouble.

Now, @ZetaR60, what is not clear to me is whether the RTT/RTC functions are safe to call from within an interrupt. Reading the code suggests it's not as the overflow would not get handled immediately. If that is correct, it should be documented as a limitation.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190425/8efe4af9/attachment.html>

More information about the notifications mailing list