We are using DA14531MOD with SDK 6.0.14.1114. We are using RTC alarm & clocked wakeup controller(P0_11) in deep sleep mode using below code
rtc_get_time_clndr( &time, NULL );// Alarm interrupt in five secondsalarm_time = time;alarm_time.sec += 10;rtc_set_alarm( &alarm_time, NULL, RTC_ALARM_EN_SEC );
wkupct_enable_irq(WKUPCT_PIN_SELECT(GPIO_BUTTON_PORT, GPIO_BUTTON_PIN), // Select pin WKUPCT_PIN_POLARITY(GPIO_BUTTON_PORT, GPIO_BUTTON_PIN, WKUPCT_PIN_POLARITY_LOW), // Polarity low 1, // 1 event 0); // debouncing time = 0
// Ensure PD_TIM is openSetBits16(PMU_CTRL_REG, TIM_SLEEP, 0);
// Wait until PD_TIM is openedwhile ((GetWord16(SYS_STAT_REG) & TIM_IS_UP) != TIM_IS_UP);
// Go to deep sleeparch_set_deep_sleep(PD_SYS_DOWN_RAM_OFF,PD_SYS_DOWN_RAM_OFF,PD_SYS_DOWN_RAM_OFF, false );
No issue is found to Wakeup the device from above sources. We are expecting RTC date & time should not reset after wakeup from sleep.
returns always zero with GetBits16(SYS_STAT_REG, TIM_IS_UP); after wake up
Issues we are facing here1. RTC date & time is not continuing after wake up.2. After wakeup from sleep from any one source, How to find out from which source (either RTC alarm, clocked) the DA14531 wakeups.