Skip to main content
Aswin Farzana Mohamed Ansar
Associate
March 24, 2017
Question

Is it possible to create an Exact 1ms wakeup period using RTC in Stm32l1 series controller? if yes, How it can be done? 

  • March 24, 2017
  • 3 replies
  • 821 views
Posted on March 24, 2017 at 12:35

(ref:

AN4759)

Configuration 1 - able to achieve ~1ms but not exactly 1 ms.

Configuration 2 - not able to achieve 1 ms but successfully achieved 1s as the least period and can program in multiples of it.

    This topic has been closed for replies.

    3 replies

    waclawek.jan
    Super User
    March 25, 2017
    Posted on March 25, 2017 at 01:10

    You need to use a crystal which is an integer multiple of 1kHz, i.e. not the 32.768kHz crystal. 40kHz might be one of the options. The dividers then have to be adjusted accordingly.

    JW

    Aswin Farzana Mohamed Ansar
    Associate
    March 29, 2017
    Posted on March 29, 2017 at 08:16

    Thank you Jan.

    I achieved 1 ms wakeup period by setting prediv_a as 36 and prediv_s as 0 using LSI 37kHz on the nucleo l152re.

    LSI as RTC clock

    Time base = ((36 + 1) * (0 + 1)) / 37Khz = 1ms