cancel
Showing results for 
Search instead for 
Did you mean: 

Is there STM32F051x8 in stop mode has a 1ms timer

yunhangshen
Associate II
Posted on August 05, 2013 at 09:43

Hi,I am using the STM32F051x8,I want a timer which could interrupt every 1ms in the stop mode?But I have found the TIM can't work in the stop mode,and the RTC just happen interrupt every second. How can I do?

Thanks?

#stm32f051x8-stop-mode-timer
5 REPLIES 5
Posted on August 05, 2013 at 16:28

What clocks are you using? HSE takes up to 2 ms to start.

Can you just SLEEP/WFI instead for such short periods?

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
yunhangshen
Associate II
Posted on August 06, 2013 at 09:37

Thank you for response. I need to count the time while the mcu in stop mode.And the Timing time resolution is 1 ms.Is the stm32f051x8 can do it?

yunhangshen
Associate II
Posted on August 06, 2013 at 09:39

If the mcu in stop mode ,the HSI and HSE are not work,so I use LSE as the clock source. 

Posted on August 06, 2013 at 13:46

Use the RTC's RTC_SSR register to get sub-second timing, if the granularity is not quite to your liking try a different LSE frequency.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
yunhangshen
Associate II
Posted on August 07, 2013 at 10:44

Thank you! I will try it.