4545
Fork of mbed-dev by
Diff: targets/TARGET_NXP/TARGET_LPC176X/rtc_api.c
- Revision:
- 165:2dd56e6daeec
- Parent:
- 149:156823d33999
- Child:
- 166:33361e55dd8c
--- a/targets/TARGET_NXP/TARGET_LPC176X/rtc_api.c Wed May 10 12:06:41 2017 +0100 +++ b/targets/TARGET_NXP/TARGET_LPC176X/rtc_api.c Tue May 23 12:54:50 2017 +0000 @@ -110,4 +110,13 @@ // Restart clock LPC_RTC->CCR &= ~((uint32_t)2); + + //set alarm time + LPC_RTC->ALSEC = timeinfo->tm_sec+10;//10 sec + + LPC_RTC->AMR &= (~(1 << 0)) & 0xFF; + + LPC_RTC->ILR = (1 << 0) | (1 << 1); + + printf("RTC Alarm Time Set\r\n"); }