Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: LPC1114_WakeInterruptIn
Fork of WakeUp by
Revision 23:a443fbaba1da, committed 2016-10-17
- Comitter:
- rodriguise
- Date:
- Mon Oct 17 19:59:49 2016 +0000
- Parent:
- 22:49ca85e8822f
- Commit message:
- backup
Changed in this revision
| Device/WakeUp_STM_RTC.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/Device/WakeUp_STM_RTC.cpp Wed Nov 11 20:20:27 2015 +0000
+++ b/Device/WakeUp_STM_RTC.cpp Mon Oct 17 19:59:49 2016 +0000
@@ -35,7 +35,7 @@
wait_us(250); //The f401 seems to want a delay after init
}
- //PWR->CR |= PWR_CR_DBP; //Enable power domain
+ HAL_PWR_EnableBkUpAccess();
RTC->WPR = 0xCA; //Disable RTC write protection
RTC->WPR = 0x53;
@@ -93,7 +93,7 @@
RTC->CR |= RTC_CR_ALRAE | RTC_CR_ALRAIE; //Enable Alarm
RTC->WPR = 0xFF; //Enable RTC write protection
- //PWR->CR &= ~PWR_CR_DBP; //Disable power domain
+ HAL_PWR_DisableBkUpAccess();
__enable_irq(); //Alarm is set, so irqs can be enabled again
@@ -106,14 +106,14 @@
void WakeUp::irq_handler(void)
{
//Clear RTC + EXTI interrupt flags
- //PWR->CR |= PWR_CR_DBP; //Enable power domain
+ HAL_PWR_EnableBkUpAccess(); //Enable power domain
RTC->ISR &= ~RTC_ISR_ALRAF;
RTC->WPR = 0xCA; //Disable RTC write protection
RTC->WPR = 0x53;
RTC->CR &= ~RTC_CR_ALRAE;
RTC->WPR = 0xFF; //Enable RTC write protection
EXTI->PR = RTC_EXTI_LINE_ALARM_EVENT;
- //PWR->CR &= ~PWR_CR_DBP; //Disable power domain
+ HAL_PWR_DisableBkUpAccess(); //Disable power domain
callback.call();
}
