Posted on May 17, 2011 at 13:24Hi! I am using stm32f103rd for our project. I have to put the microcontroller to sleep for power saving... I have two problems. First problem is when i use sleep mode(WFI-WFE) the independent watchdog continues to run. It causes microcontroller to reset itself continuously. In sleep mode how can i reload watchdog counter? Second problem is i have to wake the microcontroller on any usart receive interrupt. I have usart2 receive interrupt but it doesnot wake the system. Does not the usart receive wake the microcontroller ? Am i missing something? Thanks for helping
WWDG - You can simply disable this module WWDG_Enable(DISABLE), and enable it back after waking up
Wake on interrupt - If you have the interrupts enabled and the NVIC initialized for the interrupt channel, you should be able to wake on any interrupt. This is what I did (though I never got time to test it)
Clearly, independent watchdog is a security feature, so it MUST NOT be possible to block it because of LP mode. Use some periodic interrupt (RTC alarm, timers with long prescaler etc.) to wake up the system periodically and refresh the IWDG.