|
原贴地址:http://www.realview.com.cn/support/kb.asp?ID=450
QUESTIONIn RTX51 Full and RTX51 Tiny, what is meant by a "tick" or a "time slice"?
ANSWERIn RTX51 Full and RTX51 Tiny, "tick" amd "time slice" are synonymous. They are the amount of time it takes for the RTOS to increment its internal timer. This time is derived from the frequency of the oscillator connected to the microcontroller. Events are governed by the kernel orruc in units of the tick or time slice.
If a 12,000,000 Hz (12MHz) oscillator is connected to a "standard" 8051, the internal clock frequency (or the instruction clock) runs at 12,000,000 divided-by 12, or 1,000,000 Hz (1MHz).
The RTX51 tick is incremented every few ticks of the instruction clock. For example, at 12MHz, if the RTX51 tick is incremented for every 2,000 ticks of the instruction clock, then the RTX51 tick increments 500 times per second.
RTX51 Full provides a function called os_set_slice that lets you set the number of instruction ticks per RTX51 tick. Accepted values are 1,000-40,000.
RTX51 Tiny also lets you adjust the RTX51 tick in the CONF_TNY.A51 configuration file. Modify the INT_CLOCK and the accepted values are 1,000-65,535. |
|