alexan_e
Administrator
- Joined
- Mar 16, 2008
- Messages
- 11,888
- Helped
- 2,021
- Reputation
- 4,158
- Reaction score
- 2,031
- Trophy points
- 1,393
- Location
- Greece
- Activity points
- 64,371
As I wrote in a previous reply the -1 not needed, I don't know where you saw that.
SystemCoreClock represents the frequency that the core runs , for example 100MHz (100000000)
That means 100000000 ticks /sec
For 1ms you want 1/1000 of that so you use 100M/1000 , this is the same as SystemCoreClock/1000
SysTick_Config(SystemCoreClock/1000) will set the SysTick counter to give an interrupt every 1ms
In your keil installation folder browse to ARM\CMSIS (e.g. C:\Keil\ARM\CMSIS) , open the index.htm and select CORE -> Reference -> SysTick , you can read about the function there
SystemCoreClock represents the frequency that the core runs , for example 100MHz (100000000)
That means 100000000 ticks /sec
For 1ms you want 1/1000 of that so you use 100M/1000 , this is the same as SystemCoreClock/1000
SysTick_Config(SystemCoreClock/1000) will set the SysTick counter to give an interrupt every 1ms
In your keil installation folder browse to ARM\CMSIS (e.g. C:\Keil\ARM\CMSIS) , open the index.htm and select CORE -> Reference -> SysTick , you can read about the function there