[NUCLEO_F030R8] Remove timer update interrupt in sleep

pull/158/head
bcostm 2014-02-01 19:15:23 +01:00
parent 2663367dc5
commit ae20d141c5
1 changed files with 10 additions and 2 deletions

View File

@ -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