[Nuvoton] Power down RTC access from CPU domain in rtc_free

After rtc_free, RTC gets inaccessible from CPU domain but keeps counting.
pull/7031/head
ccli8 2018-05-28 13:56:31 +08:00
parent 5d8570be39
commit 2cefe7d8d5
4 changed files with 5 additions and 4 deletions

View File

@ -100,7 +100,7 @@ void rtc_init(void)
void rtc_free(void)
{
// N/A
CLK_DisableModuleClock(rtc_modinit.clkidx);
}
int rtc_isenabled(void)

View File

@ -100,7 +100,7 @@ void rtc_init(void)
void rtc_free(void)
{
// N/A
CLK_DisableModuleClock(rtc_modinit.clkidx);
}
int rtc_isenabled(void)
@ -114,6 +114,7 @@ int rtc_isenabled(void)
// NOTE: Check RTC Init Active flag to support crossing reset cycle.
return !! (RTC->INIT & RTC_INIT_ACTIVE_Msk);
}
time_t rtc_read(void)
{
/* NOTE: After boot, RTC time registers are not synced immediately, about 1 sec latency.

View File

@ -100,7 +100,7 @@ void rtc_init(void)
void rtc_free(void)
{
// N/A
CLK_DisableModuleClock(rtc_modinit.clkidx);
}
int rtc_isenabled(void)

View File

@ -100,7 +100,7 @@ void rtc_init(void)
void rtc_free(void)
{
// N/A
CLK_DisableModuleClock(rtc_modinit.clkidx);
}
int rtc_isenabled(void)