今天学习STM32F1 UCOS开发手册V2.0 第6章时遇到一个问题,想向原子哥请教一下。
第92页有一句话,如果OSCfg_TickRate_Hz为200,那么时间片长度为:200/10*5=100ms
个人感觉这个时间片长度应该为50ms。
于是查找了英文手册,看到关于dflt_time_quanta 的描述如下:
dflt_time_quanta
is the default time quanta given to a task. This value is used when
a task is created and you specify a value of 0 for the time quanta.
In other words, if the user did not specify a non-zero for the task’s
time quanta, this is the value that will be used. If passing 0 for this
argument, μC/OS-III will assume a time quanta of 1/10 the tick
rate. For example, if the tick rate is 1000 Hz and 0 is passed for
dflt_time_quanta then, μC/OS-III will set the time quanta to 10
milliseconds.
请原子哥看一下,我的疑问对不对?谢谢!
|