Skip to content

Commit fef89d9

Browse files
authored
Merge pull request #14738 from MaximIntegrated/master
Gate ticker (timer0) clock on deepsleep for MAX32620FTHR
2 parents 9fbb89e + 43d9c0f commit fef89d9

File tree

1 file changed

+4
-1
lines changed
  • targets/TARGET_Maxim/TARGET_MAX32620C

1 file changed

+4
-1
lines changed

targets/TARGET_Maxim/TARGET_MAX32620C/sleep.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (C) 2017 Maxim Integrated Products, Inc., All Rights Reserved.
2+
* Copyright (C) Maxim Integrated Products, Inc., All Rights Reserved.
33
*
44
* Permission is hereby granted, free of charge, to any person obtaining a
55
* copy of this software and associated documentation files (the "Software"),
@@ -33,6 +33,7 @@
3333

3434
#include "sleep_api.h"
3535
#include "lp.h"
36+
#include "clkman.h"
3637

3738
void hal_sleep(void)
3839
{
@@ -42,5 +43,7 @@ void hal_sleep(void)
4243
// Low-power stop mode
4344
void hal_deepsleep(void)
4445
{
46+
MXC_CLKMAN->clk_gate_ctrl1 &= ~MXC_F_CLKMAN_CLK_GATE_CTRL1_TIMER0_CLK_GATER;
4547
hal_sleep();
48+
MXC_CLKMAN->clk_gate_ctrl1 |= MXC_F_CLKMAN_CLK_GATE_CTRL1_TIMER0_CLK_GATER;
4649
}

0 commit comments

Comments
 (0)