Systick can be use only in privileged mode and it is a 'core peripheral' so you do not need enable other clock or peripheral. (usefull for low power)
It is a native autoreload counter so it do not need the tipical init sequence to force a general purpose timer in autoreload mode.
I suggest you to use it, if your application run without a RTOS or scheduler.
Systick can be use only in privileged mode and it is a 'core peripheral' so you do not need enable other clock or peripheral. (usefull for low power)
It is a native autoreload counter so it do not need the tipical init sequence to force a general purpose timer in autoreload mode.
I suggest you to use it, if your application run without a RTOS or scheduler.
Now I need to know how to configure systick timer. Suppose I want to generate interrupt from systick timer for every 0.50msec then what configuration and how i have to do?
It is very simple using Standard Peripherals Library and CMSIS
1) Include in your code:
Code:
if (SysTick_Config(SystemCoreClock / N))
{
/* SysTick Config error */
while (1);
}
where
-SystemCoreClock is your core frequency (defined in system_stm32f10x.c)
-N is IRQ frequency that you need (In case of 0.5 mSec you must set to 2000)
2)Include in your irq handler: (stm32f10x_it.c)
Code:
void SysTick_Handler(void)
{
/* any code here will be execute every systick reload */
}