Skip to content

Commit 2d32e43

Browse files
committed
MXRT: Update the LPTimer driver
1. Run in doze mode 2. Add implementation for free function Signed-off-by: Mahesh Mahadevan <[email protected]>
1 parent 4efbe62 commit 2d32e43

File tree

1 file changed

+3
-1
lines changed
  • targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_IMX

1 file changed

+3
-1
lines changed

targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_IMX/lp_ticker.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ void lp_ticker_init(void)
5252
gptConfig.clockSource = kGPT_ClockSource_LowFreq;
5353
gptConfig.enableFreeRun = true;
5454
gptConfig.enableMode = false;
55+
gptConfig.enableRunInDoze = true;
5556

5657
GPT_Init(GPT2, &gptConfig);
5758
GPT_EnableInterrupts(GPT2, kGPT_OutputCompare1InterruptEnable);
@@ -114,7 +115,8 @@ void lp_ticker_clear_interrupt(void)
114115

115116
void lp_ticker_free(void)
116117
{
117-
118+
GPT_DisableInterrupts(GPT2, kGPT_OutputCompare1InterruptEnable);
119+
NVIC_DisableIRQ(GPT2_IRQn);
118120
}
119121

120122
#endif /* DEVICE_LPTICKER */

0 commit comments

Comments
 (0)