Tick Rate LCP11u68

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Tick Rate LCP11u68

跳至解决方案
1,442 次查看
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 解答
1,329 次查看
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!
-----------------------------------------------------------------------------------------------------------------------

 

 

在原帖中查看解决方案

1 回复
1,330 次查看
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!
-----------------------------------------------------------------------------------------------------------------------