Task Initialization
www.ti.com
16
SWRU271H–October 2010–Revised April 2019
Submit Documentation Feedback
Copyright © 2010–2019, Texas Instruments Incorporated
The Operating System Abstraction Layer (OSAL)
3.2 Task Initialization
To use OSAL, locate a call to osal_start_system() at the end of the main() function. This function call is
the OSAL routine that starts the system. This routine starts the system and calls the osalInitTasks()
function defined by the application. In the SimpleBLEPeripheral project, you can find this function in
OSAL_SimpleBLEPeripheral.c:
Each layer of software using OSAL must have an initialization routine called from the function
osalInitTasks(). Within this function, the initialization routine for every layer of software is called within the
osalInitTasks(). As each task initialization routine is called, an 8-bit task ID value is assigned to the task.
The task ID determines the priority of the tasks. The task ID gives lower values higher priority. The
protocol stack tasks must have the highest priority. The initialization function of the SimpleBLEPeripheral
application, SimpleBLEPeripheral_Init(), has the highest task ID and the lowest priority.
NOTE: When creating an application, add this 8-bit task ID value to the end of the list and ensure
that the task ID is greater than the other task ID values. OSAL and HAL components are
provided in source form.