2013-05-23 02:00 AM
Hi!
There's question about sleep mode for STM32F103. When I tried to use STOP mode with event wakeup (WFE) and AWU timer, clocking from LSI, and it was needed to control CAN-bus and USART1 at the same time.Could you help me with example of how to fastly wake up from this mode? When I clock the HSE and wait for its stable flags and running other parts of the system, I miss 1-2 packets from CAN and some data from USART too.Another question is how to recognize the wake-up source? In WFE mode my system can wakeup from EXTI event (I control USART_RX and CAN_RX pins to wakeup) and RTC_Alarm event. But after woking up I cannot get any info about the wakeup source - some pins (on high-speed CAN, for example) already could change it's state, so, I cannot control them. Any event-flags are un-informative.There was one solution - for RTC Alarm, but it works unstable - I tried to compare desired Alarm-time and current time and if they are not equal - this means that wakeup was from EXTI... But it's not right I think...Any suggestions?2018-08-10 09:26 AM
Sorry, bumping old zombie unanswered threads off my feed