2009-12-07 08:57 AM
Systick newbie question
2011-05-17 04:33 AM
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.2011-05-17 04:33 AM
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.