I am trying to configure RTC alarm as wakeup source for K65F180M processor. The following changes were made in bsp and application for the same.
LPM_CPU_POWER_MODE_LLS, // Index of predefined mode
0, // Additional mode flags
LLWU_PE1_WUPE3(1), // Mode wake up events from pins 0..3
0, // Mode wake up events from pins 4..7
0, // Mode wake up events from pins 8..11
LLWU_PE4_WUPE13(1), // Mode wake up events from pins 12..15
LLWU_ME_WUME5_MASK // LLWU_ME_WUME0_MASK Mode wake up events from internal input sources -
as RTC alarm is mapped onto LLWU_ME5.
But the core is not coming out of LLS mode. RTC alarm works fine independently and transition between power modes VLPR and LLS also works fine. I want the core to out of LLS mode when RTC interrupt occurs at the predefined period. I am attaching the MQX code written for the same. Please do help me with the configuration, as i believe I am missing something in configuration. The development environment is IAR and a K65 eval kit.
- Do we need to use RTC wakeup pin?
- Is it because RTC clock gets disabled in LLS?
I have attached the code being used. One more doubt, is it possible to use debugger in low power modes like LLS, VLLSx. The bare metal implementation of power down modes allows debugger to be used even in low power modes. Is it possible in mqx? If yes, how can we do that
Original Attachment has been moved to: main.c.zip