drivers: timer: MXRT600 OS timer to wake platform from deep sleep

Enable OS Timer interrupt to wake up platform from deep sleep
mode

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
This commit is contained in:
Mahesh Mahadevan 2021-03-30 10:43:13 -05:00 committed by Kumar Gala
commit 84e7807190

View file

@ -10,6 +10,7 @@
#include <sys_clock.h>
#include <spinlock.h>
#include "fsl_ostimer.h"
#include "fsl_power.h"
#define CYC_PER_TICK ((uint32_t)((uint64_t)sys_clock_hw_cycles_per_sec() \
/ (uint64_t)CONFIG_SYS_CLOCK_TICKS_PER_SEC))
@ -59,6 +60,8 @@ int sys_clock_driver_init(const struct device *device)
base = (OSTIMER_Type *)DT_INST_REG_ADDR(0);
EnableDeepSleepIRQ(DT_INST_IRQN(0));
/* Initialize the OS timer, setting clock configuration. */
OSTIMER_Init(base);