[riot-notifications] [RIOT-OS/RIOT] sam0_common: make RTC implementation common across all sam0 MCUs (#11317)
notifications at github.com
Fri Apr 12 13:51:19 CEST 2019
dylad commented on this pull request.
- /* Software Reset the RTC */
- RTC->MODE2.CTRLA.bit.SWRST = 1;
- /* Wait end of reset */
- while (RTC->MODE2.CTRLA.bit.SWRST);
> Well you mentioned it is necessary for the device to be powered for rtc_clock_setup() to work on saml10.
I said to call `rtc_clock_setup()` before `rtc_poweroff().`
In fact, the current code still hangs for SAML10 because we're stuck in `wait_syncbusy`. Enable or disable RTC has no effect because RTC IP is not feed by the required clock so the syncbusy bit will not changed. Thus, `rtc_poweron()` is not needed here and we should setup the clock in priority. I'm sorry if I wasn't clear enough I hope my explanations get better here.
In fact, we should Setup Clock -> Disable RTC module (because of Enabled Protected regs) -> Init RTC -> Enable RTC module
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...
More information about the notifications