Skip to main content
gmotta2
Associate
December 7, 2009
Question

Systick newbie question

  • December 7, 2009
  • 2 replies
  • 680 views
Posted on December 07, 2009 at 17:57

Systick newbie question

    This topic has been closed for replies.

    2 replies

    swhite
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 13:33

    The easiest way to setup the Systick is to use the SysTick_Config() function in the

    http://www.st.com/stonline/products/support/micro/files/stm32f10x_stdperiph_lib.zip

    . This function is located in the core_cm3.h header file. You provide, as the sole argument, the number of clock cycles you want between interrupts and it does the rest.

    In your case you'd want 32,000,0000 * 0.01 = 320,000. Since the Systick timer is 24-bits, and this value is less that 2^24-1, it'll work.

    gmotta2
    gmotta2Author
    Associate
    May 17, 2011
    Posted on May 17, 2011 at 13:33

    I'm sorry my ignorance but I'm having a hard time understand how to calculate the reload value for the function SysTick_SetReload(x);

    my clock is 32,000,000 and I would like to get an interrupt every 10ms

    I just don't understand the formula. If anyone can tell me how this works I really apreciate it.