Echelon FTXL Manual do Utilizador Página 178

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 261
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 177
166 FTXL LonTalk API
Lowest Assignable Task Priority
The μC/OS-II operating system uses the lowest task priority for the idle task, and
it uses the second lowest task priority for the statistics task (if the statistics task
is enabled).
The documentation for the μC/OS-II operating system recommends that the
application not use the highest four priorities (0 through 3) or the lowest four
priorities (OS_LOWEST_PRIO-3 through OS_LOWEST_PRIO). By default, the
definitions in the FtxlOsal.h file reserve priorities 0 through 3 for high-priority
operating system tasks, and thus the file sets OS_HIGH_PRIORITY_BASE to 4.
To determine the values for the low-priority tasks, use the following formula:
AppTasksStackTasksOSTasksLowTask
+
+
=
where:
LowTask
is the value for the lowest priority-task
OSTasks
is the number of tasks reserved for the operating system, which
by default is 8 tasks
StackTasks
is the number of tasks required for the FTXL LonTalk
protocol stack, which is 10 tasks
AppTasks
is the number of application tasks that your application
requires, which is always at least 1 task
Thus, the minimum value (counting from priority 0) for the lowest priority task is
18 (8+10+1, minus 1 to count from priority 0).
Figure 17 shows the default settings in the FtxlOsal.h file for the task-priority
macros described in
Specifying Task Priorities
on page 161. The figure shows the
four reserved high-priority tasks, the four reserved low-priority tasks, the 10
tasks reserved for the FTXL LonTalk protocol stack, and the one task reserved
for the application.
Figure 17. Default Task Priority Settings within the FTXL OSAL
If you have no application tasks running in the low priority class, make sure that
the lowest assignable task priority is greater than or equal to the value of the
OS_LOW_APPLICATION_PRIORITY_BASE macro. If your application runs
any tasks in the low priority class, you need to set the lowest assignable task
priority to the lowest priority that your application uses.
Vista de página 177
1 2 ... 173 174 175 176 177 178 179 180 181 182 183 ... 260 261

Comentários a estes Manuais

Sem comentários