Merge pull request #14738 from MaximIntegrated/master

Gate ticker (timer0) clock on deepsleep for MAX32620FTHR
pull/14740/head
Martin Kojtal 2021-06-07 12:31:48 +02:00 committed by GitHub
commit fef89d93ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (C) 2017 Maxim Integrated Products, Inc., All Rights Reserved.
* Copyright (C) Maxim Integrated Products, Inc., All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@ -33,6 +33,7 @@
#include "sleep_api.h"
#include "lp.h"
#include "clkman.h"
void hal_sleep(void)
{
@ -42,5 +43,7 @@ void hal_sleep(void)
// Low-power stop mode
void hal_deepsleep(void)
{
MXC_CLKMAN->clk_gate_ctrl1 &= ~MXC_F_CLKMAN_CLK_GATE_CTRL1_TIMER0_CLK_GATER;
hal_sleep();
MXC_CLKMAN->clk_gate_ctrl1 |= MXC_F_CLKMAN_CLK_GATE_CTRL1_TIMER0_CLK_GATER;
}