drivers: timer: mcux_gpt: Enable GPT timer to run in doze mode

GPT timer must continue running in low power modes, as it is the system
wakeup source. Set configuration to ensure peripheral will not stop
running in low power modes.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This commit is contained in:
Daniel DeGrasse 2021-12-14 10:24:39 -06:00 committed by Anas Nashif
commit 59f9dfae58

View file

@ -317,6 +317,10 @@ int sys_clock_driver_init(const struct device *dev)
base = (GPT_Type *)DT_REG_ADDR(GPT_INST);
GPT_GetDefaultConfig(&gpt_config);
/* Enable GPT timer to run in SOC low power states */
gpt_config.enableRunInStop = true;
gpt_config.enableRunInWait = true;
gpt_config.enableRunInDoze = true;
/* Use 32KHz clock frequency */
gpt_config.clockSource = kGPT_ClockSource_LowFreq;
gpt_config.enableFreeRun = false; /* Set GPT to reset mode */