Tool/software:
Hello. I'm able to use the RTC to give me a periodic delay when I'm not in standby. However, once I enter standby, I no longer get the RTC compare callback.
Is there something else I need to do to wake-up from standby? I don't think I need to add a constraint to the Power mgr; it seems to me the RTC compare event is always enabled, but maybe that's no true.
void rtc_callback(uintptr_t arg)
{
rtc_timeout_ticks += delay_ticks;
HWREG(RTC_BASE + RTC_O_CH0CC8U) = rtc_timeout_ticks;
GPIO_toggle((uint8_t)DIO_GREEN_LED);
}
int main()
.....
// Initialize our timer status for our compare timer
memset((void *)&rtc_delay_node.hw_interrupt, 0, sizeof(HwiP_Struct));
// Install the interrupt handler for the RTC.
HwiP_Params rtc_params;
HwiP_Params_init(&rtc_params);
//rtc_params.arg = 0;
//rtc_params.priority = INT_PRI_LEVEL2;
HwiP_construct(&rtc_delay_node.hw_interrupt, INT_CPUIRQ0, rtc_private_isr_callback, &rtc_params);
HWREG(EVTSVT_BASE + EVTSVT_O_CPUIRQ0SEL) = EVTSVT_CPUIRQ0SEL_PUBID_AON_RTC_COMB;
// Update the run-time status for this timer
delay_ticks = 2E6/8UL;
// Adjust timeout value to be relative to the current time.
rtc_timeout_ticks = HWREG(RTC_BASE + RTC_O_TIME8U) + delay_ticks;
HWREG(RTC_BASE + RTC_O_CH0CC8U) = rtc_timeout_ticks;
HwiP_enableInterrupt(INT_CPUIRQ0);
// Enter the idle state
Power_idleFunc();
