Tick Rate LCP11u68

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Tick Rate LCP11u68

Jump to solution
703 Views
leechen
Contributor III

#define TICKRATE_HZ1 (10000)

SysTick_Config(SystemCoreClock / TICKRATE_HZ1);

what difference does it make for different tick rate setting?  for example, does it run slower if I set TICKRATE_HZ1 to 10 comparing to setting TICKRATE_HZ1  to 10000?

1 Solution
590 Views
victorjimenez
NXP TechSupport
NXP TechSupport

Hello Lee, 

If you set the TICKRATE to 10 it will run slower than if you set the TICKRATE to 10000. If you enter to the function SysTick_Config you will see that the value of SystemCoreClock / TICKRATE_HZ1 is the number of ticks you put in the RELOAD Register. So if you put a big value, for example SystemCoreClock / 10 it will run slower than if you put a smaller value (SystemCoreClock / 10000) because this value corresponds to the number of ticks necessary to shot the interrupt of the SysTick. Higher the number, slower the SysTick and vice versa. 

Hope it helps!

Victor.

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

 

 

View solution in original post

1 Reply
591 Views
victorjimenez
NXP TechSupport
NXP TechSupport

Hello Lee, 

If you set the TICKRATE to 10 it will run slower than if you set the TICKRATE to 10000. If you enter to the function SysTick_Config you will see that the value of SystemCoreClock / TICKRATE_HZ1 is the number of ticks you put in the RELOAD Register. So if you put a big value, for example SystemCoreClock / 10 it will run slower than if you put a smaller value (SystemCoreClock / 10000) because this value corresponds to the number of ticks necessary to shot the interrupt of the SysTick. Higher the number, slower the SysTick and vice versa. 

Hope it helps!

Victor.

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------