mirror of https://github.com/ARMmbed/mbed-os.git
[NUCLEO_F030R8] Remove timer update interrupt in sleep
parent
2663367dc5
commit
ae20d141c5
|
@ -32,10 +32,18 @@
|
||||||
|
|
||||||
void sleep(void)
|
void sleep(void)
|
||||||
{
|
{
|
||||||
|
// Disable us_ticker update interrupt
|
||||||
|
TIM_ITConfig(TIM1, TIM_IT_Update, DISABLE);
|
||||||
|
|
||||||
SCB->SCR = 0; // Normal sleep mode for ARM core
|
SCB->SCR = 0; // Normal sleep mode for ARM core
|
||||||
__WFI();
|
__WFI();
|
||||||
|
|
||||||
|
// Re-ensable us_ticker update interrupt
|
||||||
|
TIM_ITConfig(TIM1, TIM_IT_Update, ENABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MCU STOP mode
|
||||||
|
// Wake-up with external interrupt
|
||||||
void deepsleep(void)
|
void deepsleep(void)
|
||||||
{
|
{
|
||||||
// Enable PWR clock
|
// Enable PWR clock
|
||||||
|
|
Loading…
Reference in New Issue