I'm trying to put the LPC55S69 into deep sleep and/or power down mode and wake it with the OS Timer.
I use OSTIMER_SetMatchValue(...) to configure the sleep duration. If I use a simple __WFI(), I get "woken" and code continues to execute. If I substitute either of these for the __WFI(), the code does not wake up on the OS Timer match (OS Timer is clocked from external 32K crystal):
POWER_EnterDeepSleep(kPDRUNCFG_PD_XTAL32K,0x7FFF,WAKEUP_OS_EVENT_TIMER | WAKEUP_GPIO_GLOBALINT0,0);
POWER_EnterPowerDown(kPDRUNCFG_PD_XTAL32K,0x7FFF, WAKEUP_OS_EVENT_TIMER | WAKEUP_GPIO_GLOBALINT0, 1);
Both options do wake up correctly when one of the gpio interrupts triggers. I have referred to the power_manager_lpc project as well as the utick_wakeup projects, but neither has given me any clue as to why the OS Timer does not wake the processor.
Hello ,
Hope you are doing well.
I recommend to use the example for the OS Timer in the SDK. The OSTIMER project is a simple demonstration program of the SDK OSTIMER driver. It sets the OSTIMER as the wakeup source from deep-sleep mode. After wakeup from deep-sleep mode, OS timer will set match value to trigger the interrupt while the timer count tick reach the match value about every 2 seconds.
Best Regards,
Sabina
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------