Skip to main content
yunhangshen
Associate
August 5, 2013
Question

Is there STM32F051x8 in stop mode has a 1ms timer

  • August 5, 2013
  • 5 replies
  • 1031 views
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
This topic has been closed for replies.

5 replies

Tesla DeLorean
Guru
August 5, 2013
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 VenmoUp vote any posts that you find helpful, it shows what's working..
yunhangshen
Associate
August 6, 2013
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
August 6, 2013
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. 

Tesla DeLorean
Guru
August 6, 2013
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 VenmoUp vote any posts that you find helpful, it shows what's working..
yunhangshen
Associate
August 7, 2013
Posted on August 07, 2013 at 10:44

Thank you! I will try it.